IR2Vec
Loading...
Searching...
No Matches
OpenKE.module.model.ComplEx.ComplEx Class Reference
Inheritance diagram for OpenKE.module.model.ComplEx.ComplEx:
Collaboration diagram for OpenKE.module.model.ComplEx.ComplEx:

Public Member Functions

 __init__ (self, ent_tot, rel_tot, dim=100)
 
 forward (self, data)
 
 regularization (self, data)
 
 predict (self, data)
 
- Public Member Functions inherited from OpenKE.module.model.Model.Model
- 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

 dim = dim
 
 ent_re_embeddings = nn.Embedding(self.ent_tot, self.dim)
 
 ent_im_embeddings = nn.Embedding(self.ent_tot, self.dim)
 
 rel_re_embeddings = nn.Embedding(self.rel_tot, self.dim)
 
 rel_im_embeddings = nn.Embedding(self.rel_tot, self.dim)
 
- Public Attributes inherited from OpenKE.module.model.Model.Model
 ent_tot = ent_tot
 
 rel_tot = rel_tot
 
- 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

 _calc (self, h_re, h_im, t_re, t_im, r_re, r_im)
 

Constructor & Destructor Documentation

◆ __init__()

OpenKE.module.model.ComplEx.ComplEx.__init__ ( self,
ent_tot,
rel_tot,
dim = 100 )

Reimplemented from OpenKE.module.model.Model.Model.

Member Function Documentation

◆ forward()

OpenKE.module.model.ComplEx.ComplEx.forward ( self,
data )

Reimplemented from OpenKE.module.model.Model.Model.

◆ predict()

OpenKE.module.model.ComplEx.ComplEx.predict ( self,
data )

Reimplemented from OpenKE.module.model.Model.Model.


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