সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
টেনসরফ্লো :: অপস:: SparseSoftmax
#include <sparse_ops.h>
একটি ব্যাচ করা ND SparseTensor
এ softmax প্রয়োগ করে।
সারাংশ
ইনপুটগুলি লজিক্যাল আকৃতি [..., B, C]
(যেখানে N >= 2
), এবং ক্যানোনিকাল লেক্সিকোগ্রাফিক ক্রমে সাজানো সূচক সহ একটি ND স্পারসটেনসরকে উপস্থাপন করে।
এই অপটি আকৃতি [B, C]
সহ প্রতিটি অভ্যন্তরীণ লজিক্যাল সাবম্যাট্রিক্সে স্বাভাবিক tf.nn.softmax()
প্রয়োগ করার সমতুল্য, কিন্তু যে ধরার সাথে অন্তর্নিহিত শূন্য উপাদানগুলি অংশগ্রহণ করে না । বিশেষত, অ্যালগরিদম নিম্নলিখিতগুলির সমতুল্য:
(1) tf.nn.softmax()
আকার-সি মাত্রা বরাবর আকার [B, C]
সহ প্রতিটি অন্তর্নিহিত সাবম্যাট্রিক্সের একটি ঘনত্বের দৃশ্যে প্রয়োগ করে; (2) মূল অন্তর্নিহিত-শূন্য অবস্থানগুলি আউট মাস্ক; (3) অবশিষ্ট উপাদান পুনর্নবীকরণ.
অত:পর, SparseTensor
ফলাফলের ঠিক একই অ-শূন্য সূচক এবং আকৃতি আছে।
যুক্তি:
- স্কোপ: একটি স্কোপ অবজেক্ট
- sp_indices: 2-D. ক্যানোনিকাল ক্রমানুসারে, একটি স্পারসটেনসরে অ-খালি মানের সূচক সহ
NNZ x R
ম্যাট্রিক্স। - sp_values: 1-D.
NNZ
অ-খালি মান sp_indices
এর সাথে সম্পর্কিত। - sp_shape: 1-D. ইনপুট স্পারসটেনসরের আকৃতি।
রিটার্ন:
-
Output
: 1-D। SparseTensor
ফলাফলের জন্য NNZ
মান।
পাবলিক বৈশিষ্ট্য
পাবলিক ফাংশন
নোড
::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-25 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-25 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# tensorflow::ops::SparseSoftmax Class Reference\n\ntensorflow::ops::SparseSoftmax\n==============================\n\n`#include \u003csparse_ops.h\u003e`\n\nApplies softmax to a batched N-D `SparseTensor`.\n\nSummary\n-------\n\nThe inputs represent an N-D SparseTensor with logical shape `[..., B, C]` (where `N \u003e= 2`), and with indices sorted in the canonical lexicographic order.\n\nThis op is equivalent to applying the normal `tf.nn.softmax()` to each innermost logical submatrix with shape `[B, C]`, but with the catch that *the implicitly zero elements do not participate*. Specifically, the algorithm is equivalent to the following:\n\n(1) Applies `tf.nn.softmax()` to a densified view of each innermost submatrix with shape `[B, C]`, along the size-C dimension; (2) Masks out the original implicitly-zero locations; (3) Renormalizes the remaining elements.\n\nHence, the `SparseTensor` result has exactly the same non-zero indices and shape.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- sp_indices: 2-D. `NNZ x R` matrix with the indices of non-empty values in a SparseTensor, in canonical ordering.\n- sp_values: 1-D. `NNZ` non-empty values corresponding to `sp_indices`.\n- sp_shape: 1-D. Shape of the input SparseTensor.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): 1-D. The `NNZ` values for the result `SparseTensor`.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [SparseSoftmax](#classtensorflow_1_1ops_1_1_sparse_softmax_1a64ec9c22eb2f8d50797cfb39eb94009d)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` sp_indices, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` sp_values, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` sp_shape)` ||\n\n| ### Public attributes ||\n|--------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_sparse_softmax_1ad2dc43b15de20c26df875d2e2f5e9191) | [Operation](/versions/r2.1/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_sparse_softmax_1a94b1fda8269b6888396b9c165fdd28b1) | `::`[tensorflow::Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|--------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_sparse_softmax_1aabb6b649a7d5f3c8a9db2dea2c44ef1a)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_sparse_softmax_1af6f0269e4c290ac6b8234ba881dafe13)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_sparse_softmax_1a1fccadd0a530764ea2d1691045ebf2a5)`() const ` | ` ` ` ` |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output\n\n```text\n::tensorflow::Output output\n``` \n\nPublic functions\n----------------\n\n### SparseSoftmax\n\n```gdscript\n SparseSoftmax(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input sp_indices,\n ::tensorflow::Input sp_values,\n ::tensorflow::Input sp_shape\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```"]]