সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
টেনসরফ্লো :: অপস:: InTopK
#include <nn_ops.h>
বলে কি লক্ষ্য শীর্ষ K
ভবিষ্যদ্বাণী মধ্যে আছে.
সারাংশ
এটি একটি batch_size
বুল অ্যারে আউটপুট করে, একটি এন্ট্রি out[i]
true
যদি লক্ষ্য শ্রেণীর জন্য ভবিষ্যদ্বাণীটি সমস্ত ভবিষ্যদ্বাণীগুলির মধ্যে শীর্ষ k
ভবিষ্যদ্বাণীগুলির মধ্যে থাকে উদাহরণস্বরূপ i
. উল্লেখ্য যে InTopK
এর আচরণ TopK
অপ-এর থেকে সম্পর্ক পরিচালনার ক্ষেত্রে আলাদা; যদি একাধিক ক্লাসের একই ভবিষ্যদ্বাণীর মান থাকে এবং শীর্ষ- k
সীমারেখায় স্ট্র্যাডল থাকে, তবে সেই সমস্ত শ্রেণীগুলিকে শীর্ষ k
তে ধরা হবে।
আরো আনুষ্ঠানিকভাবে, যাক
\(predictions_i\) সব শ্রেণীর জন্য ভবিষ্যদ্বাণী হতে হবে উদাহরণস্বরূপ i
, \(targets_i\) লক্ষ্য শ্রেণী হও উদাহরণস্বরূপ i
, \(out_i\) আউটপুট হও উদাহরণস্বরূপ i
,
$$out_i = predictions_{i, targets_i} TopKIncludingTies(predictions_i)$$
যুক্তি:
- স্কোপ: একটি স্কোপ অবজেক্ট
- পূর্বাভাস: একটি
batch_size
x classes
টেনসর। - লক্ষ্য: ক্লাস আইডির একটি
batch_size
ভেক্টর। - k: কম্পিউটিং নির্ভুলতার জন্য শীর্ষ উপাদানগুলির সংখ্যা।
রিটার্ন:
পাবলিক বৈশিষ্ট্য
পাবলিক ফাংশন
নোড
::tensorflow::Node * node() const
operator::tensorflow::Input() const
অপারেটর::টেনসরফ্লো::আউটপুট
operator::tensorflow::Output() const
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-26 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-26 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# tensorflow::ops::InTopK Class Reference\n\ntensorflow::ops::InTopK\n=======================\n\n`#include \u003cnn_ops.h\u003e`\n\nSays whether the targets are in the top `K` predictions.\n\nSummary\n-------\n\nThis outputs a `batch_size` bool array, an entry `out[i]` is `true` if the prediction for the target class is among the top `k` predictions among all predictions for example `i`. Note that the behavior of [InTopK](/versions/r1.15/api_docs/cc/class/tensorflow/ops/in-top-k#classtensorflow_1_1ops_1_1_in_top_k) differs from the [TopK](/versions/r1.15/api_docs/cc/class/tensorflow/ops/top-k#classtensorflow_1_1ops_1_1_top_k) op in its handling of ties; if multiple classes have the same prediction value and straddle the top-`k` boundary, all of those classes are considered to be in the top `k`.\n\nMore formally, let\n\n\\\\(predictions_i\\\\) be the predictions for all classes for example `i`, \\\\(targets_i\\\\) be the target class for example `i`, \\\\(out_i\\\\) be the output for example `i`,\n\n$$out_i = predictions_{i, targets_i} TopKIncludingTies(predictions_i)$$\n\nArguments:\n\n- scope: A [Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- predictions: A `batch_size` x `classes` tensor.\n- targets: A `batch_size` vector of class ids.\n- k: Number of top elements to look at for computing precision.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): Computed Precision at `k` as a `bool `[Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor).\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [InTopK](#classtensorflow_1_1ops_1_1_in_top_k_1a377574cc533f3b91fea7345442e1998f)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` predictions, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` targets, int64 k)` ||\n\n| ### Public attributes ||\n|--------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_in_top_k_1afe7a77dd6f17c474fce97861cab29527) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [precision](#classtensorflow_1_1ops_1_1_in_top_k_1a43116d147476cd8f69ce01d5c3c9f915) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|--------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_in_top_k_1a135e20737a15b73e8336cea65b60ad87)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_in_top_k_1a0b88d86f83d7e064c8c3189793a3400b)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_in_top_k_1a63713331ec8812a5470f740a7fd9f5df)`() const ` | ` ` ` ` |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### precision\n\n```text\n::tensorflow::Output precision\n``` \n\nPublic functions\n----------------\n\n### InTopK\n\n```gdscript\n InTopK(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input predictions,\n ::tensorflow::Input targets,\n int64 k\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n```"]]