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

Method FOR

include/instance/model/graph.h:52–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50 Float gradient, const Optimizer &optimizer, Float weight = 1) {
51 auto update = get_update_function < Float, optimizer_type>();
52 FOR(i, dim) {
53 Float v = vertex[i];
54 Float c = context[i];
55 vertex[i] -= (optimizer.*update)(v, gradient * c, weight);
56 context[i] -= (optimizer.*update)(c, gradient * v, weight);
57 }
58 }
59
60 template<OptimizerType optimizer_type>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected