/external/tensorflow/tensorflow/lite/kernels/ |
D | topk_v2.cc | 33 const TfLiteTensor* top_k = GetInput(context, node, kInputTopK); in ResizeOutput() local 35 TF_LITE_ENSURE_EQ(context, top_k->type, kTfLiteInt32); in ResizeOutput() 37 TF_LITE_ENSURE_EQ(context, NumElements(top_k), 1); in ResizeOutput() 38 const int32 k = *GetTensorData<int32_t>(top_k); in ResizeOutput() 179 const auto& top_k = topc.sorted_result(); in TopK() local 180 std::copy(top_k.begin(), top_k.end(), indexes_row); in TopK() 181 std::transform(top_k.begin(), top_k.end(), output_row, in TopK() 197 const TfLiteTensor* top_k = GetInput(context, node, kInputTopK); in Prepare() local 198 TF_LITE_ENSURE_EQ(context, top_k->type, kTfLiteInt32); in Prepare() 201 if (IsConstantTensor(top_k)) { in Prepare() [all …]
|
D | topk_v2_test.cc | 36 TopKV2OpModel(int top_k, std::initializer_list<int> input_shape, in TopKV2OpModel() argument 45 top_k_ = AddConstInput(TensorType_INT32, {top_k}, {1}); in TopKV2OpModel() 54 PopulateTensor<int32_t>(top_k_, {top_k}); in TopKV2OpModel()
|
/external/tensorflow/tensorflow/lite/tools/accuracy/ilsvrc/ |
D | imagenet_accuracy_eval.cc | 35 ResultsWriter::ResultsWriter(int top_k, const std::string& output_file_path) in ResultsWriter() argument 36 : top_k_(top_k) { in ResultsWriter() 51 columns.reserve(top_k); in ResultsWriter() 52 for (int i = 0; i < top_k; i++) { in ResultsWriter() 162 int top_k, const std::string& output_file_path) { in CreateImagenetEvalResultsWriter() argument 164 new ResultsWriter(top_k, output_file_path)); in CreateImagenetEvalResultsWriter()
|
D | imagenet_accuracy_eval.h | 34 ResultsWriter(int top_k, const std::string& output_file_path); 78 int top_k, const std::string& output_file_path);
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
D | topk_op_test.py | 51 values_op, indices_op = nn_ops.top_k(inputs, k, sorted=sorted) 199 values, _ = nn_ops.top_k(inputs, k) 208 nn_ops.top_k(inputs, 4) 214 values, _ = nn_ops.top_k(inputs, 3) 241 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/lite/examples/python/ |
D | label_image.py | 89 top_k = results.argsort()[-5:][::-1] variable 91 for i in top_k:
|
/external/tensorflow/tensorflow/compiler/tests/ |
D | sort_ops_test.py | 96 return nn_ops.top_k(v, k=k, sorted=True) 124 return nn_ops.top_k(v, k=k, sorted=True) 140 topk = nn_ops.top_k(p, k=4) 158 topk = nn_ops.top_k(p, k=6)
|
/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/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/examples/speech_commands/ |
D | label_wav.py | 68 top_k = predictions.argsort()[-num_top_predictions:][::-1] 69 for node_id in top_k:
|
D | label_wav_dir.py | 77 top_k = predictions.argsort()[-num_top_predictions:][::-1] 78 for node_id in top_k:
|
/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/python/keras/utils/ |
D | metrics_utils.py | 241 top_k=None, argument 353 if top_k is not None: 354 y_pred = _filter_top_k(y_pred, top_k) 472 _, top_k_idx = nn_ops.top_k(x, k, sorted=False)
|
/external/tensorflow/tensorflow/python/keras/ |
D | metrics.py | 1176 top_k=None, argument 1199 self.top_k = top_k 1202 default_threshold = 0.5 if top_k is None else metrics_utils.NEG_INF 1236 top_k=self.top_k, 1253 'top_k': self.top_k, 1302 top_k=None, argument 1325 self.top_k = top_k 1328 default_threshold = 0.5 if top_k is None else metrics_utils.NEG_INF 1362 top_k=self.top_k, 1379 'top_k': self.top_k,
|
D | metrics_confusion_matrix_test.py | 326 name='my_precision', thresholds=[0.4, 0.9], top_k=15, class_id=12) 332 self.assertEqual(p_obj.top_k, 15) 340 self.assertEqual(p_obj2.top_k, 15) 444 p_obj = metrics.Precision(top_k=3) 452 p_obj = metrics.Precision(top_k=3) 497 p_obj = metrics.Precision(class_id=2, top_k=2) 515 p_obj = metrics.Precision(thresholds=.7, top_k=2) 531 name='my_recall', thresholds=[0.4, 0.9], top_k=15, class_id=12) 537 self.assertEqual(r_obj.top_k, 15) 545 self.assertEqual(r_obj2.top_k, 15) [all …]
|
/external/tensorflow/tensorflow/examples/label_image/ |
D | label_image.py | 137 top_k = results.argsort()[-5:][::-1] variable 139 for i in top_k:
|
/external/tensorflow/tensorflow/examples/tutorials/word2vec/ |
D | word2vec_basic.py | 292 top_k = 8 # number of nearest neighbors 293 nearest = (-sim[i, :]).argsort()[1:top_k + 1] 298 ', '.join([reverse_dictionary[nearest[k]] for k in range(top_k)]))
|
/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 | 198 values, indices = nn_ops.top_k(top_k_input, k)
|
/external/tensorflow/tensorflow/tools/api/golden/v2/ |
D | tensorflow.metrics.-recall.pbtxt | 116 …argspec: "args=[\'self\', \'thresholds\', \'top_k\', \'class_id\', \'name\', \'dtype\'], varargs=N…
|
/external/tensorflow/tensorflow/tools/api/golden/v1/ |
D | tensorflow.keras.metrics.-precision.pbtxt | 116 …argspec: "args=[\'self\', \'thresholds\', \'top_k\', \'class_id\', \'name\', \'dtype\'], varargs=N…
|
/external/tensorflow/tensorflow/compiler/aot/tests/ |
D | make_test_graphs.py | 153 output = nn_ops.top_k(x, 2, name='values')
|