/external/tensorflow/tensorflow/lite/kernels/ |
D | topk_v2.cc | 38 const TfLiteTensor* top_k; in ResizeOutput() local 39 TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, kInputTopK, &top_k)); in ResizeOutput() 41 TF_LITE_ENSURE_TYPES_EQ(context, top_k->type, kTfLiteInt32); in ResizeOutput() 43 TF_LITE_ENSURE_EQ(context, NumElements(top_k), 1); in ResizeOutput() 44 const int32 k = *GetTensorData<int32_t>(top_k); in ResizeOutput() 190 const auto& top_k = topc.sorted_result(); in TopK() local 191 std::copy(top_k.begin(), top_k.end(), indexes_row); in TopK() 192 std::transform(top_k.begin(), top_k.end(), output_row, in TopK() 211 const TfLiteTensor* top_k; in Prepare() local 212 TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, kInputTopK, &top_k)); in Prepare() [all …]
|
D | topk_v2_test.cc | 38 TopKV2OpModel(int top_k, std::initializer_list<int> input_shape, in TopKV2OpModel() argument 47 top_k_ = AddConstInput(TensorType_INT32, {top_k}, {1}); in TopKV2OpModel() 56 PopulateTensor<int32_t>(top_k_, {top_k}); in TopKV2OpModel()
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
D | topk_op_test.py | 51 values_op, indices_op = nn_ops.top_k(inputs, k, sorted=sorted) 201 values, _ = nn_ops.top_k(inputs, k) 210 nn_ops.top_k(inputs, 4) 216 values, _ = nn_ops.top_k(inputs, 3) 243 op = nn_ops.top_k(v, k)
|
/external/tensorflow/tensorflow/lite/experimental/kernels/ |
D | ctc_beam_search.h | 248 const bool top_k = in Step() local 251 const int max_classes = top_k ? label_selection_size_ : (num_classes_ - 1); in Step() 254 if (top_k) { in Step() 335 const int label = top_k ? top_k_indices[ind] : ind; in Step() 336 const float logit = top_k ? top_k_logits[ind] : raw_input(ind); in Step()
|
/external/tensorflow/tensorflow/python/compiler/tensorrt/test/ |
D | topk_test.py | 35 values, indices = nn_ops.top_k(x, k_tensor, name="TopK") 56 values, indices = nn_ops.top_k(x, k_tensor, name="TopK")
|
/external/tensorflow/tensorflow/core/kernels/ |
D | in_topk_op_test.cc | 36 static Graph* InTopK(int num_targets, int num_classes, T top_k) { in InTopK() argument 48 k_t.scalar<T>() = k_t.scalar<T>().constant(top_k); in InTopK()
|
D | topk_op.cc | 191 std::unique_ptr<std::vector<int32>> top_k(filter.Extract()); in Compute() local 192 for (auto top_k_it = top_k->begin(); top_k_it != top_k->end(); in Compute()
|
/external/tensorflow/tensorflow/lite/examples/python/ |
D | label_image.py | 93 top_k = results.argsort()[-5:][::-1] variable 95 for i in top_k:
|
/external/tensorflow/tensorflow/core/util/ctc/ |
D | ctc_beam_search.h | 253 const bool top_k = in Step() local 257 top_k ? label_selection_size_ : (this->num_classes_ - 1); in Step() 260 if (top_k) { in Step() 340 const int label = top_k ? top_k_indices[ind] : ind; in Step() 341 const T logit = top_k ? top_k_logits[ind] : raw_input(ind); in Step()
|
/external/tensorflow/tensorflow/lite/tools/evaluation/stages/ |
D | topk_accuracy_eval_stage.cc | 106 std::vector<int> top_k = GetTopKIndices(probabilities, params.k()); in Run() local 107 UpdateCounts(top_k); in Run()
|
/external/tensorflow/tensorflow/examples/speech_commands/ |
D | label_wav_dir.py | 76 top_k = predictions.argsort()[-num_top_predictions:][::-1] 77 for node_id in top_k:
|
D | label_wav.py | 68 top_k = predictions.argsort()[-num_top_predictions:][::-1] 69 for node_id in top_k:
|
/external/tensorflow/tensorflow/python/keras/utils/ |
D | metrics_utils.py | 240 top_k=None, argument 355 if top_k is not None: 356 y_pred = _filter_top_k(y_pred, top_k) 473 _, top_k_idx = nn_ops.top_k(x, k, sorted=False)
|
/external/tensorflow/tensorflow/examples/label_image/ |
D | label_image.py | 135 top_k = results.argsort()[-5:][::-1] variable 137 for i in top_k:
|
/external/tensorflow/tensorflow/python/keras/ |
D | metrics.py | 1271 top_k=None, argument 1277 self.top_k = top_k 1280 default_threshold = 0.5 if top_k is None else metrics_utils.NEG_INF 1314 top_k=self.top_k, 1331 'top_k': self.top_k, 1396 top_k=None, argument 1402 self.top_k = top_k 1405 default_threshold = 0.5 if top_k is None else metrics_utils.NEG_INF 1439 top_k=self.top_k, 1456 'top_k': self.top_k,
|
D | metrics_confusion_matrix_test.py | 328 name='my_precision', thresholds=[0.4, 0.9], top_k=15, class_id=12) 334 self.assertEqual(p_obj.top_k, 15) 342 self.assertEqual(p_obj2.top_k, 15) 446 p_obj = metrics.Precision(top_k=3) 454 p_obj = metrics.Precision(top_k=3) 499 p_obj = metrics.Precision(class_id=2, top_k=2) 517 p_obj = metrics.Precision(thresholds=.7, top_k=2) 533 name='my_recall', thresholds=[0.4, 0.9], top_k=15, class_id=12) 539 self.assertEqual(r_obj.top_k, 15) 547 self.assertEqual(r_obj2.top_k, 15) [all …]
|
/external/tensorflow/tensorflow/compiler/tests/ |
D | sort_ops_test.py | 265 return nn_ops.top_k(v, k=k, sorted=True) 302 return nn_ops.top_k(v, k=k, sorted=True) 319 topk = nn_ops.top_k(p, k=4) 337 topk = nn_ops.top_k(p, k=6)
|
/external/tensorflow/tensorflow/lite/testing/op_tests/ |
D | topk.py | 49 out = tf.nn.top_k(input_value, k)
|
/external/tensorflow/tensorflow/python/ops/ |
D | sort_ops.py | 233 values, indices = nn_ops.top_k(top_k_input, k)
|
/external/tensorflow/tensorflow/tools/api/golden/v1/ |
D | tensorflow.keras.metrics.-precision.pbtxt | 133 …argspec: "args=[\'self\', \'thresholds\', \'top_k\', \'class_id\', \'name\', \'dtype\'], varargs=N…
|
D | tensorflow.keras.metrics.-recall.pbtxt | 133 …argspec: "args=[\'self\', \'thresholds\', \'top_k\', \'class_id\', \'name\', \'dtype\'], varargs=N…
|
/external/tensorflow/tensorflow/tools/api/golden/v2/ |
D | tensorflow.metrics.-recall.pbtxt | 133 …argspec: "args=[\'self\', \'thresholds\', \'top_k\', \'class_id\', \'name\', \'dtype\'], varargs=N…
|
D | tensorflow.metrics.-precision.pbtxt | 133 …argspec: "args=[\'self\', \'thresholds\', \'top_k\', \'class_id\', \'name\', \'dtype\'], varargs=N…
|
D | tensorflow.keras.metrics.-recall.pbtxt | 133 …argspec: "args=[\'self\', \'thresholds\', \'top_k\', \'class_id\', \'name\', \'dtype\'], varargs=N…
|
/external/tensorflow/tensorflow/compiler/aot/tests/ |
D | make_test_graphs.py | 154 output = nn_ops.top_k(x, 2, name='values')
|