टेंसरफ़्लो:: ऑप्स:: इकट्ठा करेंV2
#include <array_ops.h> indices के अनुसार params अक्ष axis से स्लाइस इकट्ठा करें ।
सारांश
indices किसी भी आयाम (आमतौर पर 0-डी या 1-डी) का पूर्णांक टेंसर होना चाहिए। आकार 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]
ध्यान दें कि सीपीयू पर, यदि कोई आउट ऑफ बाउंड इंडेक्स पाया जाता है, तो एक त्रुटि वापस आ जाती है। जीपीयू पर, यदि आउट ऑफ बाउंड इंडेक्स पाया जाता है, तो संबंधित आउटपुट मान में 0 संग्रहीत किया जाता है।
tf.batch_gather और tf.gather_nd भी देखें।
तर्क:
- स्कोप: एक स्कोप ऑब्जेक्ट
- पैरामीटर: वह टेंसर जिससे मान एकत्रित करना है। कम से कम रैंक
axis + 1होना चाहिए। - सूचकांक: सूचकांक टेंसर।
[0, params.shape[axis])सीमा में होना चाहिए। - अक्ष:
indicesइकट्ठा करने के लिएparamsमें अक्ष। पहले आयाम पर डिफ़ॉल्ट. नकारात्मक सूचकांक का समर्थन करता है.
रिटर्न:
-
Output: आकारparams.shape[:axis] + indices.shape + params.shape[axis + 1:]के साथindicesद्वारा दिए गए सूचकांकों से एकत्रित किए गएparamsके मान।
निर्माता और विध्वंसक | |
|---|---|
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
सार्वजनिक समारोह
इकट्ठा करेंV2
GatherV2( const ::tensorflow::Scope & scope, ::tensorflow::Input params, ::tensorflow::Input indices, ::tensorflow::Input axis )
इकट्ठा करेंV2
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 )