MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / error

Function error

examples/machine_learning/neural_network.cpp:40–43  ·  view source on GitHub ↗

Cost function

Source from the content-addressed store, hash-verified

38
39// Cost function
40double error(const array &out, const array &pred) {
41 array dif = (out - pred);
42 return sqrt((double)(sum<float>(dif * dif)));
43}
44
45class ann {
46 private:

Callers 1

trainMethod · 0.70

Calls 1

sqrtFunction · 0.85

Tested by

no test coverage detected