Lines Matching refs:scores
27 float ComputeSoftmaxProbability(const std::vector<float> &scores, int label) { in ComputeSoftmaxProbability() argument
28 if ((label < 0) || (label >= scores.size())) { in ComputeSoftmaxProbability()
30 << "[0, " << scores.size() << ")"; in ComputeSoftmaxProbability()
43 const float label_score = scores[label]; in ComputeSoftmaxProbability()
45 for (int i = 0; i < scores.size(); ++i) { in ComputeSoftmaxProbability()
47 const float delta_score = scores[i] - label_score; in ComputeSoftmaxProbability()
73 std::vector<float> ComputeSoftmax(const std::vector<float> &scores) { in ComputeSoftmax() argument
76 exp_scores.reserve(scores.size()); in ComputeSoftmax()
77 softmax.reserve(scores.size()); in ComputeSoftmax()
81 for (const auto &score : scores) { in ComputeSoftmax()
85 for (auto &score : scores) { in ComputeSoftmax()
93 for (int i = 0; i < scores.size(); ++i) { in ComputeSoftmax()