Home
last modified time | relevance | path

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

123456

/external/tensorflow/tensorflow/python/ops/
Dconfusion_matrix.py29 labels, predictions, expected_rank_diff=0, name=None): argument
55 [labels, predictions]):
56 predictions = ops.convert_to_tensor(predictions)
58 predictions_shape = predictions.get_shape()
67 predictions = array_ops.squeeze(predictions, [-1])
71 return labels, predictions
74 rank_diff = array_ops.rank(predictions) - array_ops.rank(labels)
77 predictions = control_flow_ops.cond(
79 lambda: array_ops.squeeze(predictions, [-1]),
80 lambda: predictions)
[all …]
Dmetrics_impl.py84 def _remove_squeezable_dimensions(predictions, labels, weights): argument
107 predictions = ops.convert_to_tensor(predictions)
109 labels, predictions = confusion_matrix.remove_squeezable_dimensions(
110 labels, predictions)
111 predictions.get_shape().assert_is_compatible_with(labels.get_shape())
114 return predictions, labels, None
120 return predictions, labels, weights
122 predictions_shape = predictions.get_shape()
133 rank_diff = weights_rank_tensor - array_ops.rank(predictions)
157 return predictions, labels, weights
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/math_ops/
Din_topk_op_test.py26 def _validateInTopK(self, predictions, target, k, expected): argument
29 precision = nn_ops.in_top_k(predictions, target, k)
35 predictions = [[0.1, 0.3, 0.2, 0.4], [0.1, 0.2, 0.3, 0.4]]
37 self._validateInTopK(predictions, target, 1, [True, False])
40 predictions = [[0.1, 0.3, 0.2, 0.4], [0.1, 0.2, 0.3, 0.4]]
42 self._validateInTopK(predictions, target, 2, [False, True])
46 predictions = [[0.1, 0.3, 0.2, 0.2], [0.1, 0.3, 0.2, 0.2]]
48 self._validateInTopK(predictions, target, 2, [True, True])
51 predictions = [[0.1, 0.3, 0.2, 0.4], [0.1, 0.2, 0.3, 0.4]]
53 self._validateInTopK(predictions, target, 2, [False, True])
[all …]
Dconfusion_matrix_test.py42 labels=[1, 2, 4], predictions=[2, 2, 4])))
44 def _testConfMatrix(self, labels, predictions, truth, weights=None, argument
47 dtype = predictions.dtype
49 labels, predictions, dtype=dtype, weights=weights,
56 predictions = np.arange(5, dtype=dtype)
66 self._testConfMatrix(labels=labels, predictions=predictions, truth=truth)
120 predictions = np.asarray([1, 2, 3], dtype=dtype)
132 self._testConfMatrix(labels=labels, predictions=predictions, truth=truth)
144 predictions = np.asarray([1, 1, 2, 3, 5, 6, 1, 2, 3, 4], dtype=dtype)
156 self._testConfMatrix(labels=labels, predictions=predictions, truth=truth)
[all …]
/external/tensorflow/tensorflow/python/keras/distribute/
Ddataset_creator_model_fit_test.py167 _, predictions = self._model_predict(strategy, steps=3)
171 self.assertTrue(all(predictions[0] == predictions[i] for i in [0, 3, 5]))
174 all(predictions[0] == predictions[i] for i in [0, 1, 2, 4]))
178 _, predictions = self._model_predict(strategy, test_data=x)
180 self.assertTrue(all(predictions[0] == predictions[i] for i in [0, 3, 5]))
182 all(predictions[0] == predictions[i] for i in [0, 1, 2, 4]))
186 _, predictions = self._model_predict(strategy, test_data=x)
187 self.assertTrue(all(predictions[0] == predictions[i] for i in [0, 3, 5]))
189 all(predictions[0] == predictions[i] for i in [0, 1, 2, 4]))
192 _, predictions = self._model_predict(
[all …]
/external/tensorflow/tensorflow/python/distribute/
Dmetrics_v1_test.py152 predictions = x["predictions"]
153 return metrics.accuracy(labels, predictions)
167 predictions = x["predictions"]
169 labels, predictions, num_classes=5)
186 predictions = x["predictions"]
188 labels, predictions, num_classes=5)
223 predictions = x["predictions"]
224 return metrics.auc(labels, predictions, num_thresholds=8, curve="ROC",
237 predictions = x["predictions"]
238 return metrics.auc(labels, predictions, num_thresholds=8, curve="PR",
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/
Dmetrics_test.py558 predictions=array_ops.ones((10, 1)),
568 predictions=array_ops.ones((10, 1)),
577 predictions=array_ops.ones((10, 1)),
584 predictions = array_ops.ones((10, 3))
587 metrics.accuracy(labels, predictions)
591 predictions = array_ops.ones((10, 3))
595 metrics.accuracy(labels, predictions, weights)
599 predictions = random_ops.random_uniform(
603 accuracy, update_op = metrics.accuracy(labels, predictions)
627 predictions = preds_queue.dequeue()
[all …]
/external/tensorflow/tensorflow/python/ops/losses/
Dlosses_impl.py218 labels, predictions, weights=1.0, scope=None, argument
257 if predictions is None:
260 (predictions, labels, weights)) as scope:
261 predictions = math_ops.cast(predictions, dtype=dtypes.float32)
263 predictions.get_shape().assert_is_compatible_with(labels.get_shape())
264 losses = math_ops.abs(math_ops.subtract(predictions, labels))
273 labels, predictions, axis=None, weights=1.0, scope=None, argument
312 if predictions is None:
315 (predictions, labels, weights)) as scope:
316 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 …]
/external/ComputeLibrary/src/core/CPP/kernels/
DCPPTopKVKernel.cpp52 Status validate_arguments(const ITensorInfo *predictions, const ITensorInfo *targets, ITensorInfo *… in validate_arguments() argument
55 …ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(predictions, 1, DataType::QASYMM8, DataType::… in validate_arguments()
58 ARM_COMPUTE_RETURN_ERROR_ON(predictions->num_dimensions() > 2); in validate_arguments()
60 ARM_COMPUTE_RETURN_ERROR_ON(targets->dimension(0) != predictions->dimension(1)); in validate_arguments()
99 void CPPTopKVKernel::configure(const ITensor *predictions, const ITensor *targets, ITensor *output,… in configure() argument
101 ARM_COMPUTE_ERROR_ON_NULLPTR(predictions, targets, output); in configure()
104 …ARM_COMPUTE_ERROR_THROW_ON(validate_arguments(predictions->info(), targets->info(), output->info()… in configure()
107 _predictions = predictions; in configure()
112 _batch_size = predictions->info()->dimension(1); in configure()
113 _num_classes = predictions->info()->dimension(0); in configure()
[all …]
/external/tensorflow/tensorflow/python/keras/saving/utils_v1/
Dsignature_def_utils.py24 inputs, loss, predictions=None, metrics=None): argument
27 predictions=predictions, metrics=metrics)
31 inputs, loss, predictions=None, metrics=None): argument
34 predictions=predictions, metrics=metrics)
38 method_name, inputs, loss=None, predictions=None, argument
67 for output_set in (loss, predictions, metrics):
Dexport_utils.py253 mode, serving_export_outputs=None, predictions=None, loss=None, argument
287 return get_export_outputs(serving_export_outputs, predictions)
290 loss=loss, predictions=predictions, metrics=metrics)}
293 loss=loss, predictions=predictions, metrics=metrics)}
296 def get_export_outputs(export_outputs, predictions): argument
312 default_output = export_output_lib.PredictOutput(predictions)
/external/libtextclassifier/native/annotator/translate/
Dtranslate_test.cc104 const auto predictions = in TEST_F() local
106 EXPECT_EQ(predictions->size(), 1); in TEST_F()
107 EXPECT_EQ(predictions->Get(0)->language_tag()->str(), "cs"); in TEST_F()
108 EXPECT_GT(predictions->Get(0)->confidence_score(), 0); in TEST_F()
109 EXPECT_LE(predictions->Get(0)->confidence_score(), 1); in TEST_F()
121 const auto predictions = in TEST_F() local
123 EXPECT_EQ(predictions->size(), 2); in TEST_F()
124 EXPECT_EQ(predictions->Get(0)->language_tag()->str(), "zh"); in TEST_F()
125 EXPECT_GT(predictions->Get(0)->confidence_score(), 0); in TEST_F()
126 EXPECT_LE(predictions->Get(0)->confidence_score(), 1); in TEST_F()
[all …]
/external/ComputeLibrary/tests/validation/CPP/
DTopKV.cpp88 Tensor predictions = create_tensor<Tensor>(TensorShape(10, 20), DataType::F32); in TEST_CASE() local
91 predictions.allocator()->allocate(); in TEST_CASE()
95 fill_tensor(Accessor(predictions), std::vector<float> in TEST_CASE()
124 topkv.configure(&predictions, &targets, &output, k); in TEST_CASE()
141 …Tensor predictions = create_tensor<Tensor>(TensorShape(10, 20), DataType::QASYMM8, 1, Quantization… in TEST_CASE() local
144 predictions.allocator()->allocate(); in TEST_CASE()
148 fill_tensor(Accessor(predictions), std::vector<uint8_t> in TEST_CASE()
177 topkv.configure(&predictions, &targets, &output, k); in TEST_CASE()
194 …Tensor predictions = create_tensor<Tensor>(TensorShape(10, 20), DataType::QASYMM8_SIGNED, 1, Quant… in TEST_CASE() local
197 predictions.allocator()->allocate(); in TEST_CASE()
[all …]
/external/tensorflow/tensorflow/python/saved_model/model_utils/
Dexport_output_test.py242 predictions = {u'output1': constant_op.constant(['foo'])}
249 outputter = MockSupervisedOutput(loss, predictions, metrics)
252 outputter.predictions['predictions/output1'], predictions['output1'])
260 loss['my_loss'], predictions['output1'], metrics['metrics'])
263 outputter.predictions, {'predictions': predictions['output1']})
271 self.assertIsNone(outputter.predictions)
288 predictions = {(u'output1', '2'): constant_op.constant(['foo'])}
296 outputter = MockSupervisedOutput(loss, predictions, metrics)
298 self.assertEqual(set(outputter.predictions.keys()),
311 predictions = {u'predictions': constant_op.constant(['foo'])}
[all …]
/external/tensorflow/tensorflow/python/keras/utils/
Dlosses_utils.py92 labels, predictions, expected_rank_diff=0, name=None): argument
118 if not isinstance(predictions, ragged_tensor.RaggedTensor):
119 predictions = ops.convert_to_tensor_v2_with_dispatch(predictions)
122 predictions_shape = predictions.shape
131 predictions = array_ops.squeeze(predictions, [-1])
135 return labels, predictions
138 rank_diff = array_ops.rank(predictions) - array_ops.rank(labels)
141 predictions = control_flow_ops.cond(
143 lambda: array_ops.squeeze(predictions, [-1]),
144 lambda: predictions)
[all …]
/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/ComputeLibrary/src/runtime/CPP/functions/
DCPPTopKV.cpp32 void CPPTopKV::configure(const ITensor *predictions, const ITensor *targets, ITensor *output, const… in configure() argument
34 ARM_COMPUTE_LOG_PARAMS(predictions, targets, output, k); in configure()
37 kernel->configure(predictions, targets, output, k); in configure()
41 Status CPPTopKV::validate(const ITensorInfo *predictions, const ITensorInfo *targets, ITensorInfo *… in validate() argument
43 return CPPTopKVKernel::validate(predictions, targets, output, k); in validate()
/external/tensorflow/tensorflow/python/saved_model/
Dsignature_def_utils_impl.py67 def regression_signature_def(examples, predictions): argument
89 if predictions is None:
98 output_tensor_info = utils.build_tensor_info(predictions)
217 inputs, loss, predictions=None, metrics=None): argument
220 predictions=predictions, metrics=metrics)
224 inputs, loss, predictions=None, metrics=None): argument
227 predictions=predictions, metrics=metrics)
231 method_name, inputs, loss=None, predictions=None, argument
260 for output_set in (loss, predictions, metrics):
/external/tensorflow/tensorflow/python/kernel_tests/nn_ops/
Dlosses_test.py108 predictions = constant_op.constant([4, 8, 12, 8, 1, 3], shape=(2, 3))
110 losses.absolute_difference(labels, predictions)
657 predictions = np.asarray([.9, .2, .2, .8, .4, .6]).reshape((2, 3))
660 self._np_predictions = predictions
665 labels, np.log(predictions + epsilon)) + np.multiply(
666 1 - labels, np.log(1 - predictions + epsilon))
668 self._predictions = constant_op.constant(predictions)
868 predictions = constant_op.constant([[-1.0], [2.1]])
871 _ = losses.huber_loss(labels, predictions).eval()
876 predictions = constant_op.constant([1.5, -1.4, -1.0, 0.0])
[all …]
/external/libtextclassifier/native/lang_id/
Dlang-id.cc103 if (lang_id_result.predictions.empty()) { in FindLanguage()
107 const std::string &language = lang_id_result.predictions[0].first; in FindLanguage()
108 const float probability = lang_id_result.predictions[0].second; in FindLanguage()
134 result->predictions.clear(); in FindLanguages()
136 result->predictions.emplace_back(LangId::kUnknownLanguageCode, 1); in FindLanguages()
147 result->predictions.emplace_back(LangId::kUnknownLanguageCode, 1); in FindLanguages()
165 result->predictions.emplace_back(language, probability); in FindLanguages()
173 result->predictions.emplace_back(GetLanguageForSoftmaxLabel(index), in FindLanguages()
/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/tensorflow/tensorflow/python/feature_column/
Dfeature_column_test.py348 predictions = fc.linear_model(features, [price])
354 self.assertAllClose([[0.], [0.]], self.evaluate(predictions))
356 self.assertAllClose([[10.], [50.]], self.evaluate(predictions))
362 predictions = get_keras_linear_model_predictions(features, [price])
368 self.assertAllClose([[0.], [0.]], self.evaluate(predictions))
370 self.assertAllClose([[10.], [50.]], self.evaluate(predictions))
535 predictions = fc.linear_model(features, [bucketized_price])
544 self.evaluate(predictions))
552 self.evaluate(predictions))
555 self.evaluate(predictions))
[all …]

123456