Home
last modified time | relevance | path

Searched refs:top_k (Results 1 – 25 of 48) sorted by relevance

12

/external/tensorflow/tensorflow/lite/kernels/
Dtopk_v2.cc33 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 …]
Dtopk_v2_test.cc31 int top_k) { in TopKV2OpModel() argument
38 PopulateTensor<int32_t>(top_k_, {top_k}); in TopKV2OpModel()
/external/tensorflow/tensorflow/compiler/tests/
Dsort_ops_test.py96 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/
Dtopk_op_test.py51 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/
Dmetrics_utils.py216 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/
Dctc_beam_search.h248 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/
Dctc_beam_search.h251 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/
Dlabel_image.py80 top_k = results.argsort()[-5:][::-1] variable
82 for i in top_k:
/external/tensorflow/tensorflow/python/keras/
Dmetrics.py1115 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,
Dmetrics_confusion_matrix_test.py325 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/
Dtopk_test.py42 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/
Dlabel_wav.py71 top_k = predictions.argsort()[-num_top_predictions:][::-1]
72 for node_id in top_k:
Dlabel_wav_dir.py80 top_k = predictions.argsort()[-num_top_predictions:][::-1]
81 for node_id in top_k:
/external/tensorflow/tensorflow/core/kernels/
Dtopk_op.cc189 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/
Dlabel_image.py137 top_k = results.argsort()[-5:][::-1] variable
139 for i in top_k:
/external/tensorflow/tensorflow/examples/tutorials/word2vec/
Dword2vec_basic.py275 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/
Dsparsemax.py62 z_sorted, _ = nn.top_k(z, k=dims)
/external/tensorflow/tensorflow/contrib/distributions/python/ops/bijectors/
Dpermute.py116 p, _ = nn_ops.top_k(-permutation,
/external/tensorflow/tensorflow/contrib/image/python/ops/
Dimage_ops.py433 top_k=-1, argument
465 distance_mat, num_valid_rows, top_k, name=name)
/external/tensorflow/tensorflow/python/ops/
Dsort_ops.py178 values, indices = nn_ops.top_k(top_k_input, k)
/external/tensorflow/tensorflow/contrib/nn/python/ops/
Dsampling_ops.py102 _, resampled_indices = nn.top_k(sampled_logits, k=num_resampled, sorted=False)
/external/tensorflow/tensorflow/contrib/distributions/python/ops/
Dstatistical_testing.py155 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/
Dsliced_wasserstein_impl.py143 sorted_tmatrix = nn_ops.top_k(tmatrix, num_rows)[0]
/external/tensorflow/tensorflow/tools/api/golden/v2/
Dtensorflow.metrics.-recall.pbtxt90 …argspec: "args=[\'self\', \'thresholds\', \'top_k\', \'class_id\', \'name\', \'dtype\'], varargs=N…
/external/tensorflow/tensorflow/tools/api/golden/v1/
Dtensorflow.keras.metrics.-recall.pbtxt90 …argspec: "args=[\'self\', \'thresholds\', \'top_k\', \'class_id\', \'name\', \'dtype\'], varargs=N…

12