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

Method forward

include/instance/model/knowledge_graph.h:359–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357
358 __host__ __device__
359 static void forward(const Vector &head, const Vector &tail, const Vector &relation, Float &output,
360 float l3_regularization) {
361 output = 0;
362 FOR(i, dim) {
363 int j = i ^ 1;
364 output += head[i] * relation[i] * tail[j];
365 }
366 output = SUM(output);
367 }
368
369 template<OptimizerType optimizer_type>
370 __host__ __device__

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected