Skip to content

Commit

Permalink
update formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
yukew1998 committed Dec 19, 2024
1 parent 9165382 commit 7285845
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions torch_geometric/nn/kge/transf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
from torch_geometric.nn.kge import KGEModel

class TransF(KGEModel):
r"""The TransF model from the "Knowledge Graph Embedding by Flexible Translation"
paper.
r"""The TransF model from the "Knowledge Graph Embedding by
Flexible Translation" cccccbchdufkjvlkejkfhftultfgcigvrdugvpaper.
:class:`TransF` introduces a flexible translation mechanism by dynamically
scaling the relation vector based on head and tail entity embeddings, resulting in:
scaling the relation vector based on head and tail entity embeddings,
resulting in:
.. math::
\mathbf{e}_h + f(\mathbf{e}_h, \mathbf{e}_t, \mathbf{e}_r)
Expand All @@ -30,7 +31,9 @@ class TransF(KGEModel):
.. math::
d(h, r, t) = - \| \mathbf{e}_h +
.. math::
f(\mathbf{e}_h, \mathbf{e}_t, \mathbf{e}_r) \cdot \mathbf{e}_r - \mathbf{e}_t \|_p
f(\mathbf{e}_h, \mathbf{e}_t, \mathbf{e}_r) \cdot
.. math::
\mathbf{e}_r - \mathbf{e}_t \|_p
.. note::
For an example of using the :class:`TransF` model, see
Expand Down

0 comments on commit 7285845

Please sign in to comment.