tensorflow :: অপস:: সংগ্রহ ভি 2

#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]

মনে রাখবেন যে CPU-তে, আউট অফ বাউন্ড সূচক পাওয়া গেলে, একটি ত্রুটি ফেরত দেওয়া হয়। GPU-তে, যদি একটি আউট অফ বাউন্ড সূচক পাওয়া যায়, একটি 0 সংশ্লিষ্ট আউটপুট মানের মধ্যে সংরক্ষণ করা হয়।

এছাড়াও tf.batch_gather এবং tf.gather_nd দেখুন।

যুক্তি:

  • স্কোপ: একটি স্কোপ অবজেক্ট
  • params: যে টেনসর থেকে মান সংগ্রহ করতে হয়। কমপক্ষে র‍্যাঙ্ক axis + 1 হতে হবে।
  • indices: সূচক টেনসর। পরিসরে হতে হবে [0, params.shape[axis])
  • 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

পাবলিক ফাংশন

সংগ্রহ ভি 2

 GatherV2(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input params,
  ::tensorflow::Input indices,
  ::tensorflow::Input axis
)

সংগ্রহ ভি 2

 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
)