DistMult¶
- class ampligraph.latent_features.layers.scoring.DistMult(*args: Any, **kwargs: Any)¶
DistMult scoring layer.
The model as described in [YYH+14].
The bilinear diagonal DistMult model uses the trilinear dot product as scoring function:
\[f_{DistMult}=\langle \mathbf{r}_p, \mathbf{e}_s, \mathbf{e}_o \rangle\]where \(\mathbf{e}_{s}\) is the embedding of the subject, \(\mathbf{r}_{p}\) the embedding of the predicate and \(\mathbf{e}_{o}\) the embedding of the object.
Attributes
class_paramsexternal_paramsnameMethods
__init__(k)Initializes the scoring layer.
get_config()- __init__(k)¶
Initializes the scoring layer.
- Parameters
k (int) – Embedding size.
max_rel_size (int) – This value specifies the number of relations in the KG. It is essential only for
RotatEscoring layer (default: None).
- get_config()¶