/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() 152 const auto& top_k = topc.sorted_result(); in TopK() local 153 std::copy(top_k.begin(), top_k.end(), indexes_row); in TopK() 154 std::transform(top_k.begin(), top_k.end(), output_row, in TopK() 170 const TfLiteTensor* top_k = GetInput(context, node, kInputTopK); in Prepare() local 171 TF_LITE_ENSURE_EQ(context, top_k->type, kTfLiteInt32); in Prepare() 174 if (IsConstantTensor(top_k)) { in Prepare() [all …]
|
D | topk_v2_test.cc | 31 int top_k) { in TopKV2OpModel() argument 38 PopulateTensor<int32_t>(top_k_, {top_k}); in TopKV2OpModel()
|
/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/kernel_tests/ |
D | topk_op_test.py | 51 values_op, indices_op = nn_ops.top_k(inputs, k, sorted=sorted) 195 values, _ = nn_ops.top_k(inputs, k) 204 nn_ops.top_k(inputs, 4) 210 values, _ = nn_ops.top_k(inputs, 3) 237 op = nn_ops.top_k(v, k)
|
/external/tensorflow/tensorflow/python/keras/utils/ |
D | metrics_utils.py | 216 top_k=None, argument 296 if top_k is not None: 297 y_pred = _filter_top_k(y_pred, top_k) 380 _, top_k_idx = nn_ops.top_k(x, k, sorted=False)
|
/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/core/util/ctc/ |
D | ctc_beam_search.h | 251 const bool top_k = in Step() local 254 const int max_classes = top_k ? label_selection_size_ : (num_classes_ - 1); in Step() 257 if (top_k) { in Step() 338 const int label = top_k ? top_k_indices[ind] : ind; in Step() 339 const float logit = top_k ? top_k_logits[ind] : raw_input(ind); in Step()
|
/external/tensorflow/tensorflow/lite/examples/python/ |
D | label_image.py | 80 top_k = results.argsort()[-5:][::-1] variable 82 for i in top_k:
|
/external/tensorflow/tensorflow/python/keras/ |
D | metrics.py | 1115 top_k=None, argument 1138 self.top_k = top_k 1141 default_threshold = 0.5 if top_k is None else metrics_utils.NEG_INF 1175 top_k=self.top_k, 1192 'top_k': self.top_k, 1241 top_k=None, argument 1264 self.top_k = top_k 1267 default_threshold = 0.5 if top_k is None else metrics_utils.NEG_INF 1301 top_k=self.top_k, 1318 'top_k': self.top_k,
|
D | metrics_confusion_matrix_test.py | 325 name='my_precision', thresholds=[0.4, 0.9], top_k=15, class_id=12) 331 self.assertEqual(p_obj.top_k, 15) 339 self.assertEqual(p_obj2.top_k, 15) 443 p_obj = metrics.Precision(top_k=3) 451 p_obj = metrics.Precision(top_k=3) 496 p_obj = metrics.Precision(class_id=2, top_k=2) 514 p_obj = metrics.Precision(thresholds=.7, top_k=2) 530 name='my_recall', thresholds=[0.4, 0.9], top_k=15, class_id=12) 536 self.assertEqual(r_obj.top_k, 15) 544 self.assertEqual(r_obj2.top_k, 15) [all …]
|
/external/tensorflow/tensorflow/python/compiler/tensorrt/test/ |
D | topk_test.py | 42 values, indices = nn_ops.top_k(x, k_tensor, name="TopK") 69 values, indices = nn_ops.top_k(x, k_tensor, name="TopK")
|
/external/tensorflow/tensorflow/examples/speech_commands/ |
D | label_wav.py | 71 top_k = predictions.argsort()[-num_top_predictions:][::-1] 72 for node_id in top_k:
|
D | label_wav_dir.py | 80 top_k = predictions.argsort()[-num_top_predictions:][::-1] 81 for node_id in top_k:
|
/external/tensorflow/tensorflow/core/kernels/ |
D | topk_op.cc | 189 std::unique_ptr<std::vector<int32>> top_k(filter.Extract()); in Compute() local 190 for (auto top_k_it = top_k->begin(); top_k_it != top_k->end(); in Compute()
|
/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 | 275 top_k = 8 # number of nearest neighbors 276 nearest = (-sim[i, :]).argsort()[1:top_k + 1] 278 for k in xrange(top_k):
|
/external/tensorflow/tensorflow/contrib/sparsemax/python/ops/ |
D | sparsemax.py | 62 z_sorted, _ = nn.top_k(z, k=dims)
|
/external/tensorflow/tensorflow/contrib/distributions/python/ops/bijectors/ |
D | permute.py | 116 p, _ = nn_ops.top_k(-permutation,
|
/external/tensorflow/tensorflow/contrib/image/python/ops/ |
D | image_ops.py | 433 top_k=-1, argument 465 distance_mat, num_valid_rows, top_k, name=name)
|
/external/tensorflow/tensorflow/python/ops/ |
D | sort_ops.py | 178 values, indices = nn_ops.top_k(top_k_input, k)
|
/external/tensorflow/tensorflow/contrib/nn/python/ops/ |
D | sampling_ops.py | 102 _, resampled_indices = nn.top_k(sampled_logits, k=num_resampled, sorted=False)
|
/external/tensorflow/tensorflow/contrib/distributions/python/ops/ |
D | statistical_testing.py | 155 y, _ = nn_ops.top_k(-x, k=n, sorted=True) 158 y, _ = nn_ops.top_k(x, k=n, sorted=True)
|
/external/tensorflow/tensorflow/contrib/gan/python/eval/python/ |
D | sliced_wasserstein_impl.py | 143 sorted_tmatrix = nn_ops.top_k(tmatrix, num_rows)[0]
|
/external/tensorflow/tensorflow/tools/api/golden/v2/ |
D | tensorflow.metrics.-recall.pbtxt | 90 …argspec: "args=[\'self\', \'thresholds\', \'top_k\', \'class_id\', \'name\', \'dtype\'], varargs=N…
|
/external/tensorflow/tensorflow/tools/api/golden/v1/ |
D | tensorflow.keras.metrics.-recall.pbtxt | 90 …argspec: "args=[\'self\', \'thresholds\', \'top_k\', \'class_id\', \'name\', \'dtype\'], varargs=N…
|