Home
last modified time | relevance | path

Searched refs:predictions (Results 1 – 25 of 124) sorted by relevance

12345

/external/tensorflow/tensorflow/python/ops/
Dconfusion_matrix.py33 labels, predictions, expected_rank_diff=0, name=None): argument
59 [labels, predictions]):
60 predictions = ops.convert_to_tensor(predictions)
62 predictions_shape = predictions.get_shape()
71 predictions = array_ops.squeeze(predictions, [-1])
75 return labels, predictions
78 rank_diff = array_ops.rank(predictions) - array_ops.rank(labels)
81 predictions = control_flow_ops.cond(
83 lambda: array_ops.squeeze(predictions, [-1]),
84 lambda: predictions)
[all …]
Dmetrics_impl.py88 def _remove_squeezable_dimensions(predictions, labels, weights): argument
111 predictions = ops.convert_to_tensor(predictions)
113 labels, predictions = confusion_matrix.remove_squeezable_dimensions(
114 labels, predictions)
115 predictions.get_shape().assert_is_compatible_with(labels.get_shape())
118 return predictions, labels, None
124 return predictions, labels, weights
126 predictions_shape = predictions.get_shape()
137 rank_diff = weights_rank_tensor - array_ops.rank(predictions)
161 return predictions, labels, weights
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/
Din_topk_op_test.py30 def _validateInTopK(self, predictions, target, k, expected): argument
33 precision = nn_ops.in_top_k(predictions, target, k)
39 predictions = [[0.1, 0.3, 0.2, 0.4], [0.1, 0.2, 0.3, 0.4]]
41 self._validateInTopK(predictions, target, 1, [True, False])
44 predictions = [[0.1, 0.3, 0.2, 0.4], [0.1, 0.2, 0.3, 0.4]]
46 self._validateInTopK(predictions, target, 2, [False, True])
50 predictions = [[0.1, 0.3, 0.2, 0.2], [0.1, 0.3, 0.2, 0.2]]
52 self._validateInTopK(predictions, target, 2, [True, True])
55 predictions = [[0.1, 0.3, 0.2, 0.4], [0.1, 0.2, 0.3, 0.4]]
57 self._validateInTopK(predictions, target, 2, [False, True])
[all …]
Dmetrics_test.py563 predictions=array_ops.ones((10, 1)),
573 predictions=array_ops.ones((10, 1)),
582 predictions=array_ops.ones((10, 1)),
589 predictions = array_ops.ones((10, 3))
592 metrics.accuracy(labels, predictions)
596 predictions = array_ops.ones((10, 3))
600 metrics.accuracy(labels, predictions, weights)
604 predictions = random_ops.random_uniform(
608 accuracy, update_op = metrics.accuracy(labels, predictions)
632 predictions = preds_queue.dequeue()
[all …]
Dconfusion_matrix_test.py47 labels=[1, 2, 4], predictions=[2, 2, 4])))
49 def _testConfMatrix(self, labels, predictions, truth, weights=None, argument
52 dtype = predictions.dtype
54 labels, predictions, dtype=dtype, weights=weights,
61 predictions = np.arange(5, dtype=dtype)
71 self._testConfMatrix(labels=labels, predictions=predictions, truth=truth)
125 predictions = np.asarray([1, 2, 3], dtype=dtype)
137 self._testConfMatrix(labels=labels, predictions=predictions, truth=truth)
149 predictions = np.asarray([1, 1, 2, 3, 5, 6, 1, 2, 3, 4], dtype=dtype)
161 self._testConfMatrix(labels=labels, predictions=predictions, truth=truth)
[all …]
Dlosses_test.py112 predictions = constant_op.constant([4, 8, 12, 8, 1, 3], shape=(2, 3))
114 losses.absolute_difference(labels, predictions)
659 predictions = np.asarray([.9, .2, .2, .8, .4, .6]).reshape((2, 3))
662 self._np_predictions = predictions
667 labels, np.log(predictions + epsilon)) + np.multiply(
668 1 - labels, np.log(1 - predictions + epsilon))
670 self._predictions = constant_op.constant(predictions)
870 predictions = constant_op.constant([[-1.0], [2.1]])
873 _ = losses.huber_loss(labels, predictions).eval()
878 predictions = constant_op.constant([1.5, -1.4, -1.0, 0.0])
[all …]
/external/tensorflow/tensorflow/python/distribute/
Dmetrics_v1_test.py157 predictions = x["predictions"]
158 return metrics.accuracy(labels, predictions)
172 predictions = x["predictions"]
174 labels, predictions, num_classes=5)
191 predictions = x["predictions"]
193 labels, predictions, num_classes=5)
228 predictions = x["predictions"]
229 return metrics.auc(labels, predictions, num_thresholds=8, curve="ROC",
242 predictions = x["predictions"]
243 return metrics.auc(labels, predictions, num_thresholds=8, curve="PR",
[all …]
/external/tensorflow/tensorflow/python/ops/losses/
Dlosses_impl.py211 labels, predictions, weights=1.0, scope=None, argument
250 if predictions is None:
253 (predictions, labels, weights)) as scope:
254 predictions = math_ops.cast(predictions, dtype=dtypes.float32)
256 predictions.get_shape().assert_is_compatible_with(labels.get_shape())
257 losses = math_ops.abs(math_ops.subtract(predictions, labels))
266 labels, predictions, axis=None, weights=1.0, scope=None, argument
305 if predictions is None:
308 (predictions, labels, weights)) as scope:
309 predictions = math_ops.cast(predictions, dtype=dtypes.float32)
[all …]
/external/tensorflow/tensorflow/tools/api/golden/v1/
Dtensorflow.metrics.pbtxt5 …argspec: "args=[\'labels\', \'predictions\', \'weights\', \'metrics_collections\', \'updates_colle…
9 …argspec: "args=[\'labels\', \'predictions\', \'weights\', \'num_thresholds\', \'metrics_collection…
13 …argspec: "args=[\'labels\', \'predictions\', \'k\', \'weights\', \'metrics_collections\', \'update…
17 …argspec: "args=[\'labels\', \'predictions\', \'weights\', \'metrics_collections\', \'updates_colle…
21 …argspec: "args=[\'labels\', \'predictions\', \'thresholds\', \'weights\', \'metrics_collections\',…
25 …argspec: "args=[\'labels\', \'predictions\', \'weights\', \'metrics_collections\', \'updates_colle…
29 …argspec: "args=[\'labels\', \'predictions\', \'thresholds\', \'weights\', \'metrics_collections\',…
37 …argspec: "args=[\'labels\', \'predictions\', \'weights\', \'metrics_collections\', \'updates_colle…
41 …argspec: "args=[\'labels\', \'predictions\', \'dim\', \'weights\', \'metrics_collections\', \'upda…
45 …argspec: "args=[\'labels\', \'predictions\', \'num_classes\', \'weights\', \'metrics_collections\'…
[all …]
Dtensorflow.losses.pbtxt9 …argspec: "args=[\'labels\', \'predictions\', \'weights\', \'scope\', \'loss_collection\', \'reduct…
21 …argspec: "args=[\'labels\', \'predictions\', \'axis\', \'weights\', \'scope\', \'loss_collection\'…
45 …argspec: "args=[\'labels\', \'predictions\', \'weights\', \'delta\', \'scope\', \'loss_collection\…
49 …argspec: "args=[\'labels\', \'predictions\', \'weights\', \'epsilon\', \'scope\', \'loss_collectio…
53 …argspec: "args=[\'labels\', \'predictions\', \'weights\', \'scope\', \'loss_collection\'], varargs…
57 …argspec: "args=[\'labels\', \'predictions\', \'weights\', \'scope\', \'loss_collection\', \'reduct…
/external/libtextclassifier/native/annotator/translate/
Dtranslate_test.cc85 const auto predictions = in TEST_F() local
87 EXPECT_EQ(predictions->size(), 1); in TEST_F()
88 EXPECT_EQ(predictions->Get(0)->language_tag()->str(), "cs"); in TEST_F()
89 EXPECT_GT(predictions->Get(0)->confidence_score(), 0); in TEST_F()
90 EXPECT_LE(predictions->Get(0)->confidence_score(), 1); in TEST_F()
102 const auto predictions = in TEST_F() local
104 EXPECT_EQ(predictions->size(), 2); in TEST_F()
105 EXPECT_EQ(predictions->Get(0)->language_tag()->str(), "zh"); in TEST_F()
106 EXPECT_GT(predictions->Get(0)->confidence_score(), 0); in TEST_F()
107 EXPECT_LE(predictions->Get(0)->confidence_score(), 1); in TEST_F()
[all …]
/external/tensorflow/tensorflow/python/keras/utils/
Dlosses_utils.py84 labels, predictions, expected_rank_diff=0, name=None): argument
110 if not isinstance(predictions, ragged_tensor.RaggedTensor):
111 predictions = ops.convert_to_tensor_v2_with_dispatch(predictions)
114 predictions_shape = predictions.shape
123 predictions = array_ops.squeeze(predictions, [-1])
127 return labels, predictions
130 rank_diff = array_ops.rank(predictions) - array_ops.rank(labels)
133 predictions = control_flow_ops.cond(
135 lambda: array_ops.squeeze(predictions, [-1]),
136 lambda: predictions)
[all …]
/external/tensorflow/tensorflow/python/saved_model/model_utils/
Dexport_output_test.py245 predictions = {u'output1': constant_op.constant(['foo'])}
252 outputter = MockSupervisedOutput(loss, predictions, metrics)
255 outputter.predictions['predictions/output1'], predictions['output1'])
263 loss['my_loss'], predictions['output1'], metrics['metrics'])
266 outputter.predictions, {'predictions': predictions['output1']})
274 self.assertIsNone(outputter.predictions)
291 predictions = {(u'output1', '2'): constant_op.constant(['foo'])}
299 outputter = MockSupervisedOutput(loss, predictions, metrics)
301 self.assertEqual(set(outputter.predictions.keys()),
314 predictions = {u'predictions': constant_op.constant(['foo'])}
[all …]
Dexport_utils.py251 mode, serving_export_outputs=None, predictions=None, loss=None, argument
285 return get_export_outputs(serving_export_outputs, predictions)
288 loss=loss, predictions=predictions, metrics=metrics)}
291 loss=loss, predictions=predictions, metrics=metrics)}
294 def get_export_outputs(export_outputs, predictions): argument
310 default_output = export_output_lib.PredictOutput(predictions)
/external/tensorflow/tensorflow/core/kernels/
Din_topk_op.h48 typename TTypes<T, 2>::ConstTensor predictions, in operator()
56 typename TTypes<T, 2>::ConstTensor predictions,
59 const Eigen::Index num_targets = predictions.dimension(0);
60 const Eigen::Index num_classes = predictions.dimension(1);
75 !std::isfinite(predictions(batch_idx, target));
79 const T target_prediction = predictions(batch_idx, target);
82 T pred = predictions(batch_idx, class_idx);
Din_topk_op_gpu.cu.cc40 const T* __restrict__ predictions, // dims: [ num_targets x num_classes ] in ComputePredictionMaskKernel() argument
53 T prediction = ldg(predictions + i); in ComputePredictionMaskKernel()
55 ldg(predictions + batch_index * num_classes + target_idx); in ComputePredictionMaskKernel()
92 typename TTypes<T, 2>::ConstTensor predictions, in operator ()()
95 const Eigen::Index num_targets = predictions.dimension(0); in operator ()()
96 const Eigen::Index num_classes = predictions.dimension(1); in operator ()()
131 d.stream(), predictions.data(), targets.data(), in operator ()()
/external/tensorflow/tensorflow/python/saved_model/
Dsignature_def_utils_impl.py71 def regression_signature_def(examples, predictions): argument
92 if predictions is None:
100 output_tensor_info = utils.build_tensor_info(predictions)
213 inputs, loss, predictions=None, metrics=None): argument
216 predictions=predictions, metrics=metrics)
220 inputs, loss, predictions=None, metrics=None): argument
223 predictions=predictions, metrics=metrics)
227 method_name, inputs, loss=None, predictions=None, argument
256 for output_set in (loss, predictions, metrics):
/external/tensorflow/tensorflow/core/api_def/base_api/
Dapi_def_InTopKV2.pbtxt4 name: "predictions"
27 summary: "Says whether the targets are in the top `K` predictions."
30 prediction for the target class is among the top `k` predictions among
31 all predictions for example `i`. Note that the behavior of `InTopK` differs
38 \\(predictions_i\\) be the predictions for all classes for example `i`,
Dapi_def_InTopK.pbtxt4 name: "predictions"
27 summary: "Says whether the targets are in the top `K` predictions."
30 prediction for the target class is among the top `k` predictions among
31 all predictions for example `i`. Note that the behavior of `InTopK` differs
38 \\(predictions_i\\) be the predictions for all classes for example `i`,
/external/libtextclassifier/native/lang_id/
Dlang-id.cc102 if (lang_id_result.predictions.empty()) { in FindLanguage()
106 const std::string &language = lang_id_result.predictions[0].first; in FindLanguage()
107 const float probability = lang_id_result.predictions[0].second; in FindLanguage()
133 result->predictions.clear(); in FindLanguages()
135 result->predictions.emplace_back(LangId::kUnknownLanguageCode, 1); in FindLanguages()
146 result->predictions.emplace_back(LangId::kUnknownLanguageCode, 1); in FindLanguages()
164 result->predictions.emplace_back(language, probability); in FindLanguages()
172 result->predictions.emplace_back(GetLanguageForSoftmaxLabel(index), in FindLanguages()
Dlang-id-wrapper.cc75 for (int i = 0; i < langid_result.predictions.size(); i++) { in GetPredictions()
76 const auto& prediction = langid_result.predictions[i]; in GetPredictions()
86 const std::vector<std::pair<std::string, float>>& predictions = in GetLanguageTags() local
92 for (int i = 0; i < predictions.size(); i++) { in GetLanguageTags()
93 const auto& prediction = predictions[i]; in GetLanguageTags()
/external/tensorflow/tensorflow/python/keras/tests/
Dintegration_test.py85 predictions = model.predict(x_train)
86 self.assertEqual(predictions.shape, (x_train.shape[0], 2))
124 predictions = model.predict(x_train)
125 self.assertEqual(predictions.shape, (x_train.shape[0], 2))
175 predictions = model.predict(x_train)
176 self.assertEqual(predictions.shape, (x_train.shape[0], 2))
210 predictions = model.predict(x_train)
211 self.assertEqual(predictions.shape, (x_train.shape[0], 2))
241 predictions = model.predict(x_train)
242 self.assertEqual(predictions.shape, (x_train.shape[0], 2))
[all …]
/external/tensorflow/tensorflow/python/feature_column/
Dfeature_column_test.py355 predictions = fc.linear_model(features, [price])
361 self.assertAllClose([[0.], [0.]], self.evaluate(predictions))
363 self.assertAllClose([[10.], [50.]], self.evaluate(predictions))
369 predictions = get_keras_linear_model_predictions(features, [price])
375 self.assertAllClose([[0.], [0.]], self.evaluate(predictions))
377 self.assertAllClose([[10.], [50.]], self.evaluate(predictions))
549 predictions = fc.linear_model(features, [bucketized_price])
558 self.evaluate(predictions))
566 self.evaluate(predictions))
569 self.evaluate(predictions))
[all …]
/external/tensorflow/tensorflow/lite/micro/examples/image_recognition_experimental/
Dutil.h28 int get_top_prediction(const uint8_t* predictions, int num_categories) { in get_top_prediction() argument
29 int max_score = predictions[0]; in get_top_prediction()
34 const uint8_t category_score = predictions[category_index]; in get_top_prediction()
/external/tensorflow/tensorflow/python/eager/benchmarks/resnet50/
Dresnet50_graph_test.py58 predictions = model(images, training=False)
65 out = sess.run(predictions, feed_dict={images: np_images})
83 predictions = model(images, training=False)
93 sess.run(predictions, feed_dict={images: np_images})
99 sess.run(predictions, feed_dict={images: np_images})

12345