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

Method SimplE

python/graphvite/application/network.py:119–126  ·  view source on GitHub ↗
(heads, relations, tails)

Source from the content-addressed store, hash-verified

117
118 @staticmethod
119 def SimplE(heads, relations, tails):
120 dim = heads.size(1) // 2
121
122 tails = tails.view(-1, dim, 2).flip(2).view(-1, dim * 2)
123
124 x = heads * relations * tails
125 score = x.sum(dim=1)
126 return score
127
128 @staticmethod
129 def QuatE(heads, relations, tails):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected