MCPcopy Create free account
hub / github.com/apache/singa / Evaluate

Method Evaluate

include/singa/model/metric.h:51–54  ·  view source on GitHub ↗

Comptue the metric value averaged over all samples (in a batch)

Source from the content-addressed store, hash-verified

49
50 /// Comptue the metric value averaged over all samples (in a batch)
51 float Evaluate(const Tensor& prediction, const Tensor& target) {
52 const Tensor metric = Forward(prediction, target);
53 return Sum<float>(metric) / (1.0f * metric.Size());
54 }
55};
56/// Compute the accuray of the prediction, which is matched against the
57/// ground truth labels.

Callers

nothing calls this directly

Calls 1

SizeMethod · 0.45

Tested by

no test coverage detected