tensor akışı:: işlem:: V2'yi topla
#include <array_ops.h> indices göre params eksen axis dilimler toplayın .
Özet
indices herhangi bir boyutta (genellikle 0-D veya 1-D) bir tamsayı tensörü olmalıdır. Shape params.shape[:axis] + indices.shape + params.shape[axis + 1:] ile bir çıktı tensörü üretir; burada:
# 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'da sınır dışı bir dizin bulunursa bir hata döndürüleceğini unutmayın. GPU'da, sınırların dışında bir dizin bulunursa karşılık gelen çıkış değerinde 0 saklanır.
Ayrıca bkz. tf.batch_gather ve tf.gather_nd .
Argümanlar:
- kapsam: Bir Kapsam nesnesi
- params: Değerlerin toplanacağı tensör. En azından sıra
axis + 1olmalıdır. - endeksler: Endeks tensörü.
[0, params.shape[axis])aralığında olmalıdır. - eksen:
paramsindicestoplanacağı eksen. Varsayılan olarak ilk boyuta ayarlanır. Negatif indeksleri destekler.
İade:
-
Output: Shapeparams.shape[:axis] + indices.shape + params.shape[axis + 1:]ileindicestarafından verilen indekslerden toplananparamselde edilen değerler.
Yapıcılar ve Yıkıcılar | |
|---|---|
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) |
Genel özellikler | |
|---|---|
operation | |
output | |
Kamu işlevleri | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
Genel statik işlevler | |
|---|---|
BatchDims (int64 x) | |
Yapılar | |
|---|---|
| tensorflow:: ops:: GatherV2:: Öznitelikler | GatherV2 için isteğe bağlı öznitelik ayarlayıcılar. |
Genel özellikler
operasyon
Operation operation
çıktı
::tensorflow::Output output
Kamu işlevleri
V2'yi topla
GatherV2( const ::tensorflow::Scope & scope, ::tensorflow::Input params, ::tensorflow::Input indices, ::tensorflow::Input axis )
V2'yi topla
GatherV2( const ::tensorflow::Scope & scope, ::tensorflow::Input params, ::tensorflow::Input indices, ::tensorflow::Input axis, const GatherV2::Attrs & attrs )
düğüm
::tensorflow::Node * node() const
operatör::tensorflow::Giriş
operator::tensorflow::Input() const
operatör::tensorflow::Çıktı
operator::tensorflow::Output() const
Genel statik işlevler
Toplu Karartmalar
Attrs BatchDims( int64 x )