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

Method forward

include/instance/model/knowledge_graph.h:42–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40
41 __host__ __device__
42 static void forward(const Vector &head, const Vector &tail, const Vector &relation, Float &output, float margin) {
43 output = 0;
44 FOR(i, dim)
45 output += abs(head[i] + relation[i] - tail[i]);
46 output = margin - SUM(output);
47 }
48
49 template<OptimizerType optimizer_type>
50 __host__ __device__

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected