MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / argmin

Function argmin

tensorflow/contrib/tensor_forest/kernels/v4/grow_stats.cc:624–634  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

622// https://pdfs.semanticscholar.org/72f1/5aba2e67b1cc9cd1fb12c99e101c4c1aae4b.pdf
623
624int argmin(const std::unordered_map<int, float>& m) {
625 int c = -1;
626 float f = FLT_MAX;
627 for (const auto it : m) {
628 if (it.second < f) {
629 f = it.second;
630 c = it.first;
631 }
632 }
633 return c;
634}
635
636void FixedSizeClassStats::accumulate(int c, float w) {
637 auto it = class_weights_.find(c);

Callers 2

accumulateMethod · 0.70
ExtractFromProtoMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected