IR2Vec
Loading...
Searching...
No Matches
OpenKE.module.strategy.NegativeSampling.NegativeSampling Class Reference
Inheritance diagram for OpenKE.module.strategy.NegativeSampling.NegativeSampling:
Collaboration diagram for OpenKE.module.strategy.NegativeSampling.NegativeSampling:

Public Member Functions

 __init__ (self, model=None, loss=None, batch_size=256, regul_rate=0.0, l3_regul_rate=0.0)
 
 forward (self, data)
 
- Public Member Functions inherited from OpenKE.module.strategy.Strategy.Strategy
- Public Member Functions inherited from OpenKE.module.BaseModule.BaseModule
 load_checkpoint (self, path)
 
 save_checkpoint (self, path)
 
 load_parameters (self, path)
 
 save_parameters (self, path)
 
 get_parameters (self, mode="numpy", param_dict=None)
 
 set_parameters (self, parameters)
 

Public Attributes

 model = model
 
 loss = loss
 
 batch_size = batch_size
 
 regul_rate = regul_rate
 
 l3_regul_rate = l3_regul_rate
 
- Public Attributes inherited from OpenKE.module.BaseModule.BaseModule
 zero_const = nn.Parameter(torch.Tensor([0]))
 
 pi_const = nn.Parameter(torch.Tensor([3.14159265358979323846]))
 

Protected Member Functions

 _get_positive_score (self, score)
 
 _get_negative_score (self, score)
 

Constructor & Destructor Documentation

◆ __init__()

OpenKE.module.strategy.NegativeSampling.NegativeSampling.__init__ ( self,
model = None,
loss = None,
batch_size = 256,
regul_rate = 0.0,
l3_regul_rate = 0.0 )

The documentation for this class was generated from the following file: