MCPcopy Create free account
hub / github.com/DeepGraphLearning/graphvite / TransE

Method TransE

python/graphvite/application/network.py:78–81  ·  view source on GitHub ↗
(heads, relations, tails, margin=12)

Source from the content-addressed store, hash-verified

76
77 @staticmethod
78 def TransE(heads, relations, tails, margin=12):
79 x = heads + relations - tails
80 score = margin - x.norm(p=1, dim=1)
81 return score
82
83 @staticmethod
84 def RotatE(heads, relations, tails, margin=12):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected