टेन्सरफ्लो::ऑप्स::गैदरवी2

#include <array_ops.h>

params axis से indices के अनुसार स्लाइस एकत्रित करें ।

सारांश

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]) सीमा में होना चाहिए।
  • अक्ष: 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)

संरचनाएँ

टेन्सरफ्लो::ऑप्स::गैदरवी2::एट्रिब्यूट्स

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
)