সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
টেনসরফ্লো :: অপস:: ম্যাট্রিক্সব্যান্ড পার্ট
#include <array_ops.h>
প্রতিটি অন্তঃস্থ ম্যাট্রিক্সে একটি কেন্দ্রীয় ব্যান্ডের বাইরে সবকিছু সেট করে একটি টেনসর কপি করুন।
সারাংশ
শূন্য থেকে
band
অংশটি নিম্নরূপ গণনা করা হয়: অনুমান করুন input
k
মাত্রা আছে [I, J, K, ..., M, N]
, তাহলে আউটপুটটি একই আকারের একটি টেনসর যেখানে
band[i, j, k, ..., m, n] = in_band(m, n) * input[i, j, k, ..., m, n]
সূচক ফাংশন
in_band(m, n) = (num_lower < 0 || (mn) <= num_lower)) && (num_upper < 0 || (nm) <= num_upper)
যেমন:
# if 'input' is [[ 0, 1, 2, 3]
[-1, 0, 1, 2]
[-2, -1, 0, 1]
[-3, -2, -1, 0]],
tf.matrix_band_part(input, 1, -1) ==> [[ 0, 1, 2, 3]
[-1, 0, 1, 2]
[ 0, -1, 0, 1]
[ 0, 0, -1, 0]],
tf.matrix_band_part(input, 2, 1) ==> [[ 0, 1, 0, 0]
[-1, 0, 1, 0]
[-2, -1, 0, 1]
[ 0, -2, -1, 0]]
দরকারী বিশেষ ক্ষেত্রে:
tf.matrix_band_part(input, 0, -1) ==> Upper triangular part.
tf.matrix_band_part(input, -1, 0) ==> Lower triangular part.
tf.matrix_band_part(input, 0, 0) ==> Diagonal.
যুক্তি:
- স্কোপ: একটি স্কোপ অবজেক্ট
- ইনপুট: র্যাঙ্ক
k
টেনসর। - num_lower: 0-D টেনসর। রাখতে হবে উপকর্ণের সংখ্যা। নেতিবাচক হলে, সম্পূর্ণ নিম্ন ত্রিভুজ রাখুন।
- num_upper: 0-D টেনসর। রাখতে হবে সুপারডায়াগনালের সংখ্যা। নেতিবাচক হলে, পুরো উপরের ত্রিভুজটি রাখুন।
রিটার্ন:
-
Output
: ইনপুট হিসাবে একই আকৃতির র্যাঙ্ক 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::MatrixBandPart Class Reference\n\ntensorflow::ops::MatrixBandPart\n===============================\n\n`#include \u003carray_ops.h\u003e`\n\nCopy a tensor setting everything outside a central band in each innermost matrix.\n\nSummary\n-------\n\nto zero.\n\nThe `band` part is computed as follows: Assume `input` has `k` dimensions `[I, J, K, ..., M, N]`, then the output is a tensor with the same shape where\n\n`band[i, j, k, ..., m, n] = in_band(m, n) * input[i, j, k, ..., m, n]`.\n\nThe indicator function\n\n`in_band(m, n) = (num_lower \u003c 0 || (m-n) \u003c= num_lower)) && (num_upper \u003c 0 || (n-m) \u003c= num_upper)`.\n\nFor example:\n\n\n```text\n# if 'input' is [[ 0, 1, 2, 3]\n [-1, 0, 1, 2]\n [-2, -1, 0, 1]\n [-3, -2, -1, 0]],\n```\n\n\u003cbr /\u003e\n\n\n```scdoc\ntf.matrix_band_part(input, 1, -1) ==\u003e [[ 0, 1, 2, 3]\n [-1, 0, 1, 2]\n [ 0, -1, 0, 1]\n [ 0, 0, -1, 0]],\n```\n\n\u003cbr /\u003e\n\n\n```scdoc\ntf.matrix_band_part(input, 2, 1) ==\u003e [[ 0, 1, 0, 0]\n [-1, 0, 1, 0]\n [-2, -1, 0, 1]\n [ 0, -2, -1, 0]]\n```\n\n\u003cbr /\u003e\n\nUseful special cases:\n\n\n```scdoc\n tf.matrix_band_part(input, 0, -1) ==\u003e Upper triangular part.\n tf.matrix_band_part(input, -1, 0) ==\u003e Lower triangular part.\n tf.matrix_band_part(input, 0, 0) ==\u003e Diagonal.\n```\n\n\u003cbr /\u003e\n\nArguments:\n\n- scope: A [Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- input: Rank `k` tensor.\n- num_lower: 0-D tensor. Number of subdiagonals to keep. If negative, keep entire lower triangle.\n- num_upper: 0-D tensor. Number of superdiagonals to keep. If negative, keep entire upper triangle.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): Rank `k` tensor of the same shape as input. The extracted banded tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [MatrixBandPart](#classtensorflow_1_1ops_1_1_matrix_band_part_1aafbd4f5790f99aabe649a2603fab5026)`(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, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` num_lower, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` num_upper)` ||\n\n| ### Public attributes ||\n|----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [band](#classtensorflow_1_1ops_1_1_matrix_band_part_1a19ddd7640d84cfeb55298dcd2d150a8c) | `::`[tensorflow::Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [operation](#classtensorflow_1_1ops_1_1_matrix_band_part_1a7f11fcb9cf1a97f13cded627a9579305) | [Operation](/versions/r2.1/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n\n| ### Public functions ||\n|----------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_matrix_band_part_1a7a9ecf47b2def85ed1a8e7ab08dfe008)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_matrix_band_part_1a1b6a750bbd105a89c4ef9a398ccf7cf1)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_matrix_band_part_1a2be19e72aeddcea40f0be7cc6d6fdf97)`() const ` | ` ` ` ` |\n\nPublic attributes\n-----------------\n\n### band\n\n```text\n::tensorflow::Output band\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### MatrixBandPart\n\n```gdscript\n MatrixBandPart(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n ::tensorflow::Input num_lower,\n ::tensorflow::Input num_upper\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```"]]