সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
টেনসরফ্লো :: অপস:: স্পার্স রিশেপ
#include <sparse_ops.h>
একটি নতুন ঘন আকৃতিতে মানগুলি উপস্থাপন করতে একটি স্পারসটেনসরকে পুনরায় আকার দেয়৷
সারাংশ
এই ক্রিয়াকলাপে প্রতিনিধিত্ব করা ঘন টেনসরের পুনঃআকৃতির মতো একই শব্দার্থ আছে। অনুরোধ করা new_shape
উপর ভিত্তি করে input_indices
পুনরায় গণনা করা হয়।
new_shape
এর একটি উপাদান বিশেষ মান -1 হলে, সেই মাত্রার আকার গণনা করা হয় যাতে মোট ঘন আকার স্থির থাকে। new_shape
সর্বাধিক একটি উপাদান -1 হতে পারে। new_shape
দ্বারা নিহিত ঘন উপাদানের সংখ্যা অবশ্যই input_shape
দ্বারা উহ্য ঘন উপাদানগুলির সংখ্যার সমান হতে হবে।
রিশেপিং স্পারসটেনসরের মানগুলির ক্রমকে প্রভাবিত করে না।
যদি ইনপুট টেনসরের র্যাঙ্ক R_in
এবং N
নন-খালি মান থাকে, এবং new_shape
এর দৈর্ঘ্য R_out
থাকে, তাহলে input_indices
এর আকৃতি থাকে [N, R_in]
, input_shape
এর দৈর্ঘ্য R_in
, output_indices
আকৃতি থাকে [N, R_out]
, এবং output_shape
দৈর্ঘ্য R_out
থাকে।
যুক্তি:
- স্কোপ: একটি স্কোপ অবজেক্ট
- input_indices: 2-D. একটি SparseTensor-এ নন-খালি মানের সূচক সহ
N x R_in
ম্যাট্রিক্স। - input_shape: 1-D. ইনপুট SparseTensor এর ঘন আকৃতি সহ
R_in
ভেক্টর। - new_shape: 1-D. অনুরোধ করা নতুন ঘন আকৃতি সহ
R_out
ভেক্টর।
রিটার্ন:
-
Output
আউটপুট_সূচক: 2-ডি। N x R_out
ম্যাট্রিক্স আউটপুট স্পার্স টেনসরে অ-খালি মানগুলির আপডেট করা সূচকগুলির সাথে। -
Output
output_shape: 1-D. আউটপুট স্পারসটেনসরের সম্পূর্ণ ঘন আকৃতি সহ R_out
ভেক্টর। এটি new_shape
এর মতই কিন্তু যেকোন -1 মাত্রা পূরণ করলে।
পাবলিক বৈশিষ্ট্য
পাবলিক ফাংশন
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট 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::SparseReshape Class Reference\n\ntensorflow::ops::SparseReshape\n==============================\n\n`#include \u003csparse_ops.h\u003e`\n\nReshapes a SparseTensor to represent values in a new dense shape.\n\nSummary\n-------\n\nThis operation has the same semantics as reshape on the represented dense tensor. The `input_indices` are recomputed based on the requested `new_shape`.\n\nIf one component of `new_shape` is the special value -1, the size of that dimension is computed so that the total dense size remains constant. At most one component of `new_shape` can be -1. The number of dense elements implied by `new_shape` must be the same as the number of dense elements originally implied by `input_shape`.\n\nReshaping does not affect the order of values in the SparseTensor.\n\nIf the input tensor has rank `R_in` and `N` non-empty values, and `new_shape` has length `R_out`, then `input_indices` has shape `[N, R_in]`, `input_shape` has length `R_in`, `output_indices` has shape `[N, R_out]`, and `output_shape` has length `R_out`.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- input_indices: 2-D. `N x R_in` matrix with the indices of non-empty values in a SparseTensor.\n- input_shape: 1-D. `R_in` vector with the input SparseTensor's dense shape.\n- new_shape: 1-D. `R_out` vector with the requested new dense shape.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) output_indices: 2-D. `N x R_out` matrix with the updated indices of non-empty values in the output SparseTensor.\n- [Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) output_shape: 1-D. `R_out` vector with the full dense shape of the output SparseTensor. This is the same as `new_shape` but with any -1 dimensions filled in.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [SparseReshape](#classtensorflow_1_1ops_1_1_sparse_reshape_1a57501c2498594b147ac9bb4b371ab2ef)`(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)` input_indices, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input_shape, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` new_shape)` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_sparse_reshape_1a19240d0378428b2bf0b30ef7badcea50) | [Operation](/versions/r2.1/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output_indices](#classtensorflow_1_1ops_1_1_sparse_reshape_1a3c4d3f0b4883e4bacc4c3ba450e72431) | `::`[tensorflow::Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [output_shape](#classtensorflow_1_1ops_1_1_sparse_reshape_1a93b02c760fe2a4ea9a8495f1f8151c51) | `::`[tensorflow::Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output_indices\n\n```scdoc\n::tensorflow::Output output_indices\n``` \n\n### output_shape\n\n```scdoc\n::tensorflow::Output output_shape\n``` \n\nPublic functions\n----------------\n\n### SparseReshape\n\n```gdscript\n SparseReshape(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input_indices,\n ::tensorflow::Input input_shape,\n ::tensorflow::Input new_shape\n)\n```"]]