সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
টেনসরফ্লো :: অপস:: BatchToSpace
#include <array_ops.h>
T টাইপের 4-D টেনসরের জন্য BatchToSpace।
সারাংশ
এটি আরও সাধারণ BatchToSpaceND এর একটি উত্তরাধিকার সংস্করণ।
স্থানিক ডেটার ব্লকে ব্যাচ থেকে ডেটা পুনরায় সাজানো (পারমিউট) করে, তারপরে ক্রপ করা হয়। এটি SpaceToBatch এর বিপরীত রূপান্তর। আরও নির্দিষ্টভাবে, এই অপটি ইনপুট টেনসরের একটি অনুলিপি আউটপুট করে যেখানে batch
মাত্রা থেকে মানগুলি স্থানিক ব্লকে height
এবং width
মাত্রায় স্থানান্তরিত হয়, তারপরে height
এবং width
মাত্রা বরাবর ক্রপ করা হয়।
যুক্তি:
- স্কোপ: একটি স্কোপ অবজেক্ট
- ইনপুট: আকৃতি সহ 4-ডি টেনসর
[batch*block_size*block_size, height_pad/block_size, width_pad/block_size, depth]
মনে রাখবেন যে ইনপুট টেনসরের ব্যাচের আকার অবশ্যই block_size * block_size
দ্বারা বিভাজ্য হতে হবে। - ফসল: আকৃতি
[2, 2]
সহ অ নেতিবাচক পূর্ণসংখ্যার 2-D টেনসর। এটি নিম্নরূপ স্থানিক মাত্রা জুড়ে মধ্যবর্তী ফলাফল থেকে কতগুলি উপাদান ক্রপ করতে হবে তা নির্দিষ্ট করে: crops = [[crop_top, crop_bottom], [crop_left, crop_right]]
রিটার্ন:
-
Output
: 4-D আকৃতি সহ [batch, height, width, depth]
, যেখানে: height = height_pad - crop_top - crop_bottom
width = width_pad - crop_left - crop_right
attr block_size
অবশ্যই একের বেশি হতে হবে। এটি ব্লকের আকার নির্দেশ করে।
কিছু উদাহরণ:
(1) আকৃতির নিম্নলিখিত ইনপুট [4, 1, 1, 1]
এবং 2 এর ব্লক_সাইজের জন্য:
[[[[1]]], [[[2]]], [[[3]]], [[[4]]]]
আউটপুট টেনসরের আকৃতি রয়েছে [1, 2, 2, 1]
এবং মান:
x = [[[[1], [2]], [[3], [4]]]]
(2) আকৃতির নিম্নলিখিত ইনপুট [4, 1, 1, 3]
এবং 2 এর ব্লক_সাইজের জন্য:
[[[[1, 2, 3]]], [[[4, 5, 6]]], [[[7, 8, 9]]], [[[10, 11, 12]]]]
আউটপুট টেনসরের আকৃতি রয়েছে [1, 2, 2, 3]
এবং মান:
x = [[[[1, 2, 3], [4, 5, 6]],
[[7, 8, 9], [10, 11, 12]]]]
(3) আকৃতির নিম্নলিখিত ইনপুট [4, 2, 2, 1]
এবং 2 এর ব্লক_সাইজের জন্য:
x = [[[[1], [3]], [[9], [11]]],
[[[2], [4]], [[10], [12]]],
[[[5], [7]], [[13], [15]]],
[[[6], [8]], [[14], [16]]]]
আউটপুট টেনসরের আকৃতি [1, 4, 4, 1]
এবং মান রয়েছে:
x = [[[[1], [2], [3], [4]],
[[5], [6], [7], [8]],
[[9], [10], [11], [12]],
[[13], [14], [15], [16]]]]
(4) আকৃতির নিম্নলিখিত ইনপুট [8, 1, 2, 1]
এবং 2 এর ব্লক_সাইজের জন্য:
x = [[[[1], [3]]], [[[9], [11]]], [[[2], [4]]], [[[10], [12]]],
[[[5], [7]]], [[[13], [15]]], [[[6], [8]]], [[[14], [16]]]]
আউটপুট টেনসরের আকৃতি [2, 2, 4, 1]
এবং মান রয়েছে:
x = [[[[1], [3]], [[5], [7]]],
[[[2], [4]], [[10], [12]]],
[[[5], [7]], [[13], [15]]],
[[[6], [8]], [[14], [16]]]]
পাবলিক বৈশিষ্ট্য
পাবলিক ফাংশন
নোড
::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::BatchToSpace Class Reference\n\ntensorflow::ops::BatchToSpace\n=============================\n\n`#include \u003carray_ops.h\u003e`\n\n[BatchToSpace](/versions/r2.1/api_docs/cc/class/tensorflow/ops/batch-to-space#classtensorflow_1_1ops_1_1_batch_to_space) for 4-D tensors of type T.\n\nSummary\n-------\n\nThis is a legacy version of the more general [BatchToSpaceND](/versions/r2.1/api_docs/cc/class/tensorflow/ops/batch-to-space-n-d#classtensorflow_1_1ops_1_1_batch_to_space_n_d).\n\nRearranges (permutes) data from batch into blocks of spatial data, followed by cropping. This is the reverse transformation of SpaceToBatch. More specifically, this op outputs a copy of the input tensor where values from the `batch` dimension are moved in spatial blocks to the `height` and `width` dimensions, followed by cropping along the `height` and `width` dimensions.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- input: 4-D tensor with shape `[batch*block_size*block_size, height_pad/block_size, width_pad/block_size, depth]`. Note that the batch size of the input tensor must be divisible by `block_size * block_size`.\n- crops: 2-D tensor of non-negative integers with shape `[2, 2]`. It specifies how many elements to crop from the intermediate result across the spatial dimensions as follows: \n\n ```scdoc\n crops = [[crop_top, crop_bottom], [crop_left, crop_right]]\n ```\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): 4-D with shape `[batch, height, width, depth]`, where: \n\n ```scdoc\n height = height_pad - crop_top - crop_bottom\n width = width_pad - crop_left - crop_right\n ```\n\n\u003cbr /\u003e\n\nThe attr `block_size` must be greater than one. It indicates the block size.\n\nSome examples:\n\n(1) For the following input of shape `[4, 1, 1, 1]` and block_size of 2:\n\n\n```text\n[[[[1]]], [[[2]]], [[[3]]], [[[4]]]]\n```\n\n\u003cbr /\u003e\n\nThe output tensor has shape `[1, 2, 2, 1]` and value:\n\n\n```text\nx = [[[[1], [2]], [[3], [4]]]]\n```\n\n\u003cbr /\u003e\n\n(2) For the following input of shape `[4, 1, 1, 3]` and block_size of 2:\n\n\n```text\n[[[[1, 2, 3]]], [[[4, 5, 6]]], [[[7, 8, 9]]], [[[10, 11, 12]]]]\n```\n\n\u003cbr /\u003e\n\nThe output tensor has shape `[1, 2, 2, 3]` and value:\n\n\n```text\nx = [[[[1, 2, 3], [4, 5, 6]],\n [[7, 8, 9], [10, 11, 12]]]]\n```\n\n\u003cbr /\u003e\n\n(3) For the following input of shape `[4, 2, 2, 1]` and block_size of 2:\n\n\n```text\nx = [[[[1], [3]], [[9], [11]]],\n [[[2], [4]], [[10], [12]]],\n [[[5], [7]], [[13], [15]]],\n [[[6], [8]], [[14], [16]]]]\n```\n\n\u003cbr /\u003e\n\nThe output tensor has shape `[1, 4, 4, 1]` and value:\n\n\n```text\nx = [[[[1], [2], [3], [4]],\n [[5], [6], [7], [8]],\n [[9], [10], [11], [12]],\n [[13], [14], [15], [16]]]]\n```\n\n\u003cbr /\u003e\n\n(4) For the following input of shape `[8, 1, 2, 1]` and block_size of 2:\n\n\n```text\nx = [[[[1], [3]]], [[[9], [11]]], [[[2], [4]]], [[[10], [12]]],\n [[[5], [7]]], [[[13], [15]]], [[[6], [8]]], [[[14], [16]]]]\n```\n\n\u003cbr /\u003e\n\nThe output tensor has shape `[2, 2, 4, 1]` and value:\n\n\n```text\nx = [[[[1], [3]], [[5], [7]]],\n [[[2], [4]], [[10], [12]]],\n [[[5], [7]], [[13], [15]]],\n [[[6], [8]], [[14], [16]]]]\n```\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [BatchToSpace](#classtensorflow_1_1ops_1_1_batch_to_space_1a813bf5c031d4af21a394ba903c8dd8e7)`(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)` crops, int64 block_size)` ||\n\n| ### Public attributes ||\n|--------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_batch_to_space_1a4f9b292d9339c4c44142a6dcec013410) | [Operation](/versions/r2.1/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_batch_to_space_1aacc62122ef498fc3a9ee89afdbcc6b74) | `::`[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_batch_to_space_1a54c1c787b320c2f52099bc7bc02a85ed)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_batch_to_space_1a23f9170b61d8e17feb37f1615a383de2)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_batch_to_space_1a6e84c3b9b55d05ad30e6bcf376278c1d)`() 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### BatchToSpace\n\n```gdscript\n BatchToSpace(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n ::tensorflow::Input crops,\n int64 block_size\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```"]]