|
| __init__ (self, ent_tot, rel_tot, dim_e=100, dim_r=100, p_norm=1, norm_flag=True, rand_init=False, margin=None) |
|
| forward (self, data) |
|
| regularization (self, data) |
|
| predict (self, data) |
|
| 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) |
|
|
| dim_e = dim_e |
|
| dim_r = dim_r |
|
| norm_flag = norm_flag |
|
| p_norm = p_norm |
|
| rand_init = rand_init |
|
| ent_embeddings = nn.Embedding(self.ent_tot, self.dim_e) |
|
| rel_embeddings = nn.Embedding(self.rel_tot, self.dim_r) |
|
| transfer_matrix = nn.Embedding(self.rel_tot, self.dim_e * self.dim_r) |
|
| rel_tot |
|
| margin = nn.Parameter(torch.Tensor([margin])) |
|
bool | margin_flag = True |
|
| ent_tot = ent_tot |
|
| rel_tot = rel_tot |
|
| zero_const = nn.Parameter(torch.Tensor([0])) |
|
| pi_const = nn.Parameter(torch.Tensor([3.14159265358979323846])) |
|
|
| _calc (self, h, t, r, mode) |
|
| _transfer (self, e, r_transfer) |
|
◆ __init__()
OpenKE.module.model.TransR.TransR.__init__ |
( |
| self, |
|
|
| ent_tot, |
|
|
| rel_tot, |
|
|
| dim_e = 100, |
|
|
| dim_r = 100, |
|
|
| p_norm = 1, |
|
|
| norm_flag = True, |
|
|
| rand_init = False, |
|
|
| margin = None ) |
◆ forward()
OpenKE.module.model.TransR.TransR.forward |
( |
| self, |
|
|
| data ) |
◆ predict()
OpenKE.module.model.TransR.TransR.predict |
( |
| self, |
|
|
| data ) |
The documentation for this class was generated from the following file:
- seed_embeddings/OpenKE/module/model/TransR.py