tensorflow:: ops:: GatherV2
#include <array_ops.h> indices অনুযায়ী params axis থেকে স্লাইসগুলো সংগ্রহ করুন ।
সারসংক্ষেপ
indices অবশ্যই যেকোনো ডাইমেনশনের (সাধারণত 0-D বা 1-D) একটি ইন্টিজার টেনসর হতে হবে। params.shape[:axis] + indices.shape + params.shape[axis + 1:] আকারের একটি আউটপুট টেনসর তৈরি করে, যেখানে:
# Scalar indices (output is rank(params) - 1).
output[a_0, ..., a_n, b_0, ..., b_n] =
params[a_0, ..., a_n, indices, b_0, ..., b_n]# Vector indices (output is rank(params)). output[a_0, ..., a_n, i, b_0, ..., b_n] = params[a_0, ..., a_n, indices[i], b_0, ..., b_n]
# Higher rank indices (output is rank(params) + rank(indices) - 1).
output[a_0, ..., a_n, i, ..., j, b_0, ... b_n] =
params[a_0, ..., a_n, indices[i, ..., j], b_0, ..., b_n]
উল্লেখ্য যে, সিপিইউ-তে সীমার বাইরের কোনো ইনডেক্স পাওয়া গেলে একটি এরর দেখানো হয়। জিপিইউ-তে সীমার বাইরের কোনো ইনডেক্স পাওয়া গেলে সংশ্লিষ্ট আউটপুট ভ্যালুতে একটি ০ স্টোর করা হয়।
আরও দেখুন tf.batch_gather এবং tf.gather_nd ।
যুক্তি:
- স্কোপ: একটি স্কোপ অবজেক্ট
- params: যে টেনসর থেকে মান সংগ্রহ করা হবে। এর মান অবশ্যই rank
axis + 1বা তার চেয়ে বেশি হতে হবে। - সূচকসমূহ: সূচক টেনসর। অবশ্যই
[0, params.shape[axis])সীমার মধ্যে থাকতে হবে। - অক্ষ:
paramsথাকা সেই অক্ষ যেখান থেকেindicesসংগ্রহ করা হবে। ডিফল্টরূপে এটি প্রথম ডাইমেনশনকে ধরে নেয়। ঋণাত্মক সূচকও সমর্থন করে।
ফেরত:
-
Output:indicesদ্বারা প্রদত্ত সূচকগুলি থেকেparamsএর মান সংগ্রহ করা হয়েছে, যার আকৃতিparams.shape[:axis] + indices.shape + params.shape[axis + 1:]।
নির্মাতা এবং ধ্বংসকারী | |
|---|---|
GatherV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices, :: tensorflow::Input axis) | |
GatherV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices, :: tensorflow::Input axis, const GatherV2::Attrs & attrs) |
জনসাধারণের বৈশিষ্ট্য | |
|---|---|
operation | |
output | |
জনসাধারণের কার্যাবলী | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
পাবলিক স্ট্যাটিক ফাংশন | |
|---|---|
BatchDims (int64 x) | |
কাঠামো | |
|---|---|
| tensorflow:: ops:: GatherV2:: Attrs | GatherV2- এর জন্য ঐচ্ছিক অ্যাট্রিবিউট সেটার। |
জনসাধারণের বৈশিষ্ট্য
অপারেশন
Operation operation
আউটপুট
::tensorflow::Output output
জনসাধারণের কার্যাবলী
GatherV2
GatherV2( const ::tensorflow::Scope & scope, ::tensorflow::Input params, ::tensorflow::Input indices, ::tensorflow::Input axis )
GatherV2
GatherV2( const ::tensorflow::Scope & scope, ::tensorflow::Input params, ::tensorflow::Input indices, ::tensorflow::Input axis, const GatherV2::Attrs & attrs )
নোড
::tensorflow::Node * node() const
অপারেটর::টেনসরফ্লো::ইনপুট
operator::tensorflow::Input() const
অপারেটর::টেনসরফ্লো::আউটপুট
operator::tensorflow::Output() const
পাবলিক স্ট্যাটিক ফাংশন
ব্যাচডিমস
Attrs BatchDims( int64 x )