Home
last modified time | relevance | path

Searched refs:scores (Results 1 – 25 of 145) sorted by relevance

123456

/external/libtextclassifier/lang_id/common/math/
Dsoftmax.cc27 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 softmax.reserve(scores.size()); in ComputeSoftmax()
77 if (scores.empty()) { in ComputeSoftmax()
82 exp_scores.reserve(scores.size()); in ComputeSoftmax()
[all …]
/external/tensorflow/tensorflow/contrib/metrics/python/ops/
Dhistogram_ops.py40 scores, argument
81 name, 'auc_using_histogram', [boolean_labels, scores, score_range]):
82 scores, boolean_labels = tensor_util.remove_squeezable_dimensions(
83 scores, boolean_labels)
85 boolean_labels, scores = _check_labels_and_scores(
86 boolean_labels, scores, check_shape)
87 hist_true, hist_false = _make_auc_histograms(boolean_labels, scores,
97 def _check_labels_and_scores(boolean_labels, scores, check_shape): argument
100 values=[boolean_labels, scores]):
103 scores = ops.convert_to_tensor(scores, name='scores')
[all …]
/external/libtextclassifier/utils/math/
Dsoftmax.cc26 float ComputeSoftmaxProbability(const std::vector<float> &scores, int label) { in ComputeSoftmaxProbability() argument
27 if ((label < 0) || (label >= scores.size())) { in ComputeSoftmaxProbability()
29 << "[0, " << scores.size() << ")"; in ComputeSoftmaxProbability()
42 const float label_score = scores[label]; in ComputeSoftmaxProbability()
44 for (int i = 0; i < scores.size(); ++i) { in ComputeSoftmaxProbability()
46 const float delta_score = scores[i] - label_score; in ComputeSoftmaxProbability()
72 std::vector<float> ComputeSoftmax(const std::vector<float> &scores) { in ComputeSoftmax() argument
73 return ComputeSoftmax(scores.data(), scores.size()); in ComputeSoftmax()
76 std::vector<float> ComputeSoftmax(const float *scores, int scores_size) { in ComputeSoftmax() argument
85 const float score = scores[i]; in ComputeSoftmax()
[all …]
/external/mesa3d/src/gallium/state_trackers/wgl/
Dstw_ext_pixelformat.c334 score_pixelformats(struct stw_pixelformat_score *scores, in score_pixelformats() argument
369 scores[index].points = 0; in score_pixelformats()
379 scores[index].points = 0; in score_pixelformats()
381 scores[index].points -= (actual_value - expected_value) in score_pixelformats()
396 struct stw_pixelformat_score *scores; in wglChoosePixelFormatARB() local
407 scores = (struct stw_pixelformat_score *) in wglChoosePixelFormatARB()
409 if (scores == NULL) in wglChoosePixelFormatARB()
412 scores[i].points = 0x7fffffff; in wglChoosePixelFormatARB()
413 scores[i].index = i; in wglChoosePixelFormatARB()
420 if (!score_pixelformats(scores, count, piAttribIList[0], in wglChoosePixelFormatARB()
[all …]
/external/tensorflow/tensorflow/contrib/learn/python/learn/estimators/
Ddnn_test.py213 scores = dnn_estimator.evaluate(input_fn=_input_fn_eval, steps=1)
214 self._assertInRange(0.0, 1.0, scores['accuracy'])
305 scores = classifier.evaluate(input_fn=input_fn, steps=1)
306 self._assertInRange(0.0, 1.0, scores['accuracy'])
307 self.assertIn('loss', scores)
328 scores = classifier.evaluate(input_fn=_input_fn, steps=1)
329 self.assertIn('loss', scores)
343 scores = classifier.evaluate(x=train_x, y=train_y, steps=1)
344 self._assertInRange(0.0, 1.0, scores['accuracy'])
397 scores = classifier.evaluate(input_fn=_input_fn, steps=1)
[all …]
Ddebug_test.py226 scores = classifier.evaluate(input_fn=input_fn, steps=1)
227 self._assertInRange(0.0, 1.0, scores['accuracy'])
228 self.assertIn('loss', scores)
243 scores = classifier.evaluate(input_fn=_input_fn, steps=1)
244 self.assertIn('loss', scores)
254 scores = classifier.evaluate(x=train_x, y=train_y, steps=1)
255 self._assertInRange(0.0, 1.0, scores['accuracy'])
292 scores = classifier.evaluate(input_fn=_input_fn, steps=1)
293 self._assertInRange(0.0, 1.0, scores['accuracy'])
294 self.assertIn('loss', scores)
[all …]
Dlinear_test.py139 scores = classifier.evaluate(
141 self.assertGreater(scores['accuracy'], 0.9)
161 scores = classifier.evaluate(input_fn=_input_fn, steps=1)
162 self.assertGreater(scores['accuracy'], 0.9)
174 scores = classifier.evaluate(x=train_x, y=train_y, steps=1)
175 self.assertGreater(scores['accuracy'], 0.9)
206 scores = classifier.evaluate(input_fn=_input_fn, steps=1)
207 self.assertGreater(scores['accuracy'], 0.9)
208 self.assertIn('loss', scores)
237 scores = classifier.evaluate(input_fn=_input_fn, steps=1)
[all …]
Ddnn_linear_combined_test.py371 scores = classifier.evaluate(
373 _assert_metrics_in_range(('accuracy', 'auc'), scores)
421 scores = classifier.evaluate(input_fn=_input_fn, steps=100)
422 _assert_metrics_in_range(('accuracy', 'auc'), scores)
467 scores = classifier.evaluate(input_fn=_input_fn, steps=100)
468 _assert_metrics_in_range(('accuracy', 'auc'), scores)
515 scores = classifier.evaluate(input_fn=_input_fn, steps=1)
516 _assert_metrics_in_range(('accuracy', 'auc'), scores)
539 scores = classifier.evaluate(
541 _assert_metrics_in_range(('accuracy',), scores)
[all …]
Destimator_input_test.py181 scores = est.evaluate(
198 self.assertAllClose(scores2['MSE'], scores['MSE'])
202 self.assertAllClose(other_score, scores['MSE'])
209 scores = est.score(
217 self.assertAllClose(scores['MSE'], other_score)
218 self.assertTrue('global_step' in scores)
219 self.assertEqual(100, scores['global_step'])
227 scores = est.evaluate(
235 self.assertAllClose(other_score, scores['MSE'])
236 self.assertTrue('global_step' in scores)
[all …]
/external/tensorflow/tensorflow/examples/speech_commands/
Dlabel_wav.cc77 std::vector<std::pair<int, float>> scores; in GetTopLabels() local
78 scores.reserve(unsorted_scores_flat.size()); in GetTopLabels()
80 scores.push_back(std::pair<int, float>({i, unsorted_scores_flat(i)})); in GetTopLabels()
82 std::sort(scores.begin(), scores.end(), in GetTopLabels()
87 scores.resize(how_many_labels); in GetTopLabels()
90 for (int i = 0; i < scores.size(); ++i) { in GetTopLabels()
91 sorted_indices.flat<int>()(i) = scores[i].first; in GetTopLabels()
92 sorted_scores.flat<float>()(i) = scores[i].second; in GetTopLabels()
164 Tensor scores; in main() local
165 GetTopLabels(outputs, how_many_labels, &indices, &scores); in main()
[all …]
/external/tensorflow/tensorflow/python/keras/layers/
Ddense_attention.py72 def _apply_scores(self, scores, value, value_mask=None): argument
99 scores -= 1.e9 * math_ops.cast(padding_mask, dtype=K.floatx())
100 attention_distribution = nn.softmax(scores)
114 scores = self._calculate_scores(query=q, key=k)
115 return self._apply_scores(scores=scores, value=v, value_mask=v_mask)
251 scores = math_ops.matmul(query, key, transpose_b=True)
253 scores *= self.scale_var
254 return scores
Ddense_attention_test.py34 scores = np.array([[[1.1]]], dtype=np.float32)
40 scores=scores, value=v, value_mask=v_mask)
49 scores = np.array([[[1.1]]], dtype=np.float32)
53 scores=scores, value=v)
62 scores = np.array([[[1., 0., 1.]]], dtype=np.float32)
68 scores=scores, value=v, value_mask=v_mask)
84 scores = np.array([[[1., 0., 1.]]], dtype=np.float32)
88 scores=scores, value=v)
107 scores = np.array([[[1.1]], [[2.1]]], dtype=np.float32)
113 scores=scores, value=v, value_mask=v_mask)
/external/tensorflow/tensorflow/contrib/metrics/python/kernel_tests/
Dhistogram_ops_test.py63 scores = constant_op.constant([], shape=[0], dtype=dtypes.float32)
65 auc, update_op = histogram_ops.auc_using_histogram(labels, scores,
160 scores = array_ops.placeholder(dtypes.float32, shape=[num_records])
162 labels, scores, score_range, nbins=nbins)
168 update_op.run(feed_dict={labels: labels_a, scores: scores_a})
237 def reshape(scores): argument
238 return score_range[0] + scores * (score_range[1] - score_range[0])
244 scores = np.nan * np.ones(num_records, dtype=np.float32)
245 scores[labels] = true_scores
246 scores[~labels] = false_scores
[all …]
/external/tensorflow/tensorflow/core/kernels/
Dnon_max_suppression_op.cc43 const Tensor& scores) { in CheckScoreSizes() argument
45 OP_REQUIRES(context, scores.dims() == 1, in CheckScoreSizes()
47 scores.shape().DebugString())); in CheckScoreSizes()
48 OP_REQUIRES(context, scores.dim_size(0) == num_boxes, in CheckScoreSizes()
79 const Tensor& scores) { in CheckCombinedNMSScoreSizes() argument
81 OP_REQUIRES(context, scores.dims() == 3, in CheckCombinedNMSScoreSizes()
83 scores.shape().DebugString())); in CheckCombinedNMSScoreSizes()
84 OP_REQUIRES(context, scores.dim_size(1) == num_boxes, in CheckCombinedNMSScoreSizes()
156 OpKernelContext* context, const Tensor& scores, int num_boxes, in DoNonMaxSuppressionOp() argument
163 std::copy_n(scores.flat<T>().data(), num_boxes, scores_data.begin()); in DoNonMaxSuppressionOp()
[all …]
Dmultinomial_op_gpu.cu.cc43 const int32 num_samples, const float* scores, in MultinomialKernel() argument
47 if (ldg(maxima + maxima_idx) == ldg(scores + index)) { in MultinomialKernel()
60 typename TTypes<float>::Flat scores, in operator ()()
95 To32Bit(scores).device(d) = in operator ()()
104 /*ctx=*/ctx, /*out=*/maxima.data(), /*in=*/scores.data(), /*in_rank=*/2, in operator ()()
116 num_samples, scores.data(), maxima.data(), in operator ()()
/external/libtextclassifier/utils/sentencepiece/
Dencoder_test.cc35 float scores[] = {-0.5, -1.0, -10.0, -1.0}; in TEST() local
39 /*num_pieces=*/4, scores); in TEST()
49 scores[1] = -100.0; in TEST()
60 float scores[] = {-0.5, -1.0, -10.0, -1.0}; in TEST() local
64 /*num_pieces=*/4, scores); in TEST()
90 float scores[] = {-0.5, -1.0, -10.0, -1.0}; in TEST() local
94 /*num_pieces=*/4, scores, in TEST()
/external/libtextclassifier/lang_id/
Dlang-id.cc103 std::vector<float> scores; in FindLanguage() local
104 ComputeScores(text, &scores); in FindLanguage()
106 int prediction_id = GetArgMax(scores); in FindLanguage()
108 float probability = ComputeSoftmaxProbability(scores, prediction_id); in FindLanguage()
136 std::vector<float> scores; in FindLanguages() local
137 ComputeScores(text, &scores); in FindLanguages()
142 std::vector<float> softmax = ComputeSoftmax(scores); in FindLanguages()
206 void ComputeScores(StringPiece text, std::vector<float> *scores) const { in ComputeScores()
215 network_->ComputeFinalScores(features, scores); in ComputeScores()
/external/tensorflow/tensorflow/lite/experimental/kernels/
Dctc_decoder.h58 std::vector<Output>* output, ScoreOutput* scores) = 0;
80 CTCDecoder::ScoreOutput* scores) override { in Decode() argument
84 if (scores->rows() < batch_size_ || scores->cols() == 0) { in Decode()
94 (*scores)(b, 0) = 0; in Decode()
98 (*scores)(b, 0) += -row.maxCoeff(&max_class_ix); in Decode()
/external/tensorflow/tensorflow/contrib/pi_examples/label_image/
Dlabel_image.cc234 std::vector<std::pair<int, float>> scores; in GetTopLabels() local
236 scores.push_back(std::pair<int, float>({i, unsorted_scores_flat(i)})); in GetTopLabels()
238 std::sort(scores.begin(), scores.end(), in GetTopLabels()
243 scores.resize(how_many_labels); in GetTopLabels()
244 Tensor sorted_indices(tensorflow::DT_INT32, {scores.size()}); in GetTopLabels()
245 Tensor sorted_scores(tensorflow::DT_FLOAT, {scores.size()}); in GetTopLabels()
246 for (int i = 0; i < scores.size(); ++i) { in GetTopLabels()
247 sorted_indices.flat<int>()(i) = scores[i].first; in GetTopLabels()
248 sorted_scores.flat<float>()(i) = scores[i].second; in GetTopLabels()
269 Tensor scores; in PrintTopLabels() local
[all …]
/external/tensorflow/tensorflow/core/util/ctc/
Dctc_decoder.h58 std::vector<Output>* output, ScoreOutput* scores) = 0;
80 CTCDecoder::ScoreOutput* scores) override { in Decode() argument
85 if (scores->rows() < batch_size_ || scores->cols() == 0) { in Decode()
96 (*scores)(b, 0) = 0; in Decode()
100 (*scores)(b, 0) += -row.maxCoeff(&max_class_ix); in Decode()
Dctc_beam_search_test.cc164 Eigen::Map<Eigen::MatrixXf> scores(&score[0][0], batch_size, top_paths); in TEST() local
166 EXPECT_TRUE(decoder.Decode(seq_len, inputs, &outputs, &scores).ok()); in TEST()
177 dictionary_decoder.Decode(seq_len, inputs, &dict_outputs, &scores).ok()); in TEST()
214 Eigen::Map<Eigen::MatrixXf> scores(&score[0][0], batch_size, top_paths); in TEST() local
216 EXPECT_TRUE(decoder.Decode(seq_len, inputs, &outputs, &scores).ok()); in TEST()
309 Eigen::Map<Eigen::MatrixXf> scores(&score[0][0], batch_size, top_paths); in TEST() local
311 EXPECT_TRUE(decoder.Decode(seq_len, inputs, &outputs, &scores).ok()); in TEST()
318 EXPECT_TRUE(decoder.Decode(seq_len, inputs, &outputs, &scores).ok()); in TEST()
325 EXPECT_TRUE(decoder.Decode(seq_len, inputs, &outputs, &scores).ok()); in TEST()
333 EXPECT_TRUE(decoder.Decode(seq_len, inputs, &outputs, &scores).ok()); in TEST()
[all …]
/external/tensorflow/tensorflow/python/saved_model/model_utils/
Dexport_output.py120 def __init__(self, scores=None, classes=None): argument
134 if (scores is not None
135 and not (isinstance(scores, ops.Tensor)
136 and scores.dtype.is_floating)):
138 'got {}'.format(scores))
144 if scores is None and classes is None:
147 self._scores = scores
151 def scores(self): member in ClassificationOutput
167 examples, self.classes, self.scores)
/external/libaom/libaom/third_party/fastfeat/
Dfast.c10 int* scores; in fast9_detect_nonmax() local
14 scores = fast9_score(im, stride, corners, num_corners, b); in fast9_detect_nonmax()
15 nonmax = nonmax_suppression(corners, scores, num_corners, ret_num_corners); in fast9_detect_nonmax()
18 free(scores); in fast9_detect_nonmax()
Dnonmax.c8 xy* nonmax_suppression(const xy* corners, const int* scores, int num_corners, int* ret_num_nonmax) in nonmax_suppression() argument
54 int score = scores[i]; in nonmax_suppression()
59 if(corners[i-1].x == pos.x-1 && corners[i-1].y == pos.y && Compare(scores[i-1], score)) in nonmax_suppression()
64 if(corners[i+1].x == pos.x+1 && corners[i+1].y == pos.y && Compare(scores[i+1], score)) in nonmax_suppression()
85 if( (x == pos.x - 1 || x ==pos.x || x == pos.x+1) && Compare(scores[j], score)) in nonmax_suppression()
106 if( (x == pos.x - 1 || x ==pos.x || x == pos.x+1) && Compare(scores[j],score)) in nonmax_suppression()
/external/tensorflow/tensorflow/lite/kernels/
Ddetection_postprocess.cc201 TfLiteTensor* scores = &context->tensors[op_data->scores_index]; in Prepare() local
202 scores->type = kTfLiteFloat32; in Prepare()
203 scores->allocation_type = kTfLiteArenaRw; in Prepare()
204 SetTensorSizes(context, scores, in Prepare()
374 const std::vector<float>& scores, std::vector<int>* selected, in NonMaxSuppressionSingleClassHelper() argument
400 scores, non_max_suppression_score_threshold, &keep_scores, &keep_indices); in NonMaxSuppressionSingleClassHelper()
454 const float* scores) { in NonMaxSuppressionMultiClassRegularHelper() argument
497 *(scores + row * num_classes_with_background + col + label_offset); in NonMaxSuppressionMultiClassRegularHelper()
579 const float* scores) { in NonMaxSuppressionMultiClassFastHelper() argument
610 scores + row * num_classes_with_background + label_offset; in NonMaxSuppressionMultiClassFastHelper()
[all …]

123456