tensorflow::ops::GatherV2
#include <array_ops.h> params axis , indices göre dilimler toplayın .
Özet
indices herhangi bir boyutta (genellikle 0 boyutlu veya 1 boyutlu) bir tamsayı tensörü olmalıdır. Şu şekle sahip bir çıktı tensörü üretir params.shape[:axis] + indices.shape + params.shape[axis + 1:] 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 hata döndürülür. GPU'da ise sınır dışı bir dizin bulunursa, ilgili çıktı değerine 0 kaydedilir.
Ayrıca tf.batch_gather ve tf.gather_nd fonksiyonlarına da bakınız.
Argümanlar:
- kapsam: Bir Kapsam nesnesi
- Parametreler: Değerlerin toplanacağı tensör. En az rank
axis + 1olmalıdır. - İndeksler: İndeks tensörü.
[0, params.shape[axis])aralığında olmalıdır. - eksen:
paramsindicestoplanacağı eksen. Varsayılan olarak ilk boyuttur. Negatif indeksleri destekler.
İadeler:
-
Output:indicestarafından verilen indekslerden toplananparamselde edilen değerler,params.shape[:axis] + indices.shape + params.shape[axis + 1:]şeklindedir.
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 | |
Kamusal işlevler | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
Herkese açık statik fonksiyonlar | |
|---|---|
BatchDims (int64 x) | |
Yapılar | |
|---|---|
| tensorflow::ops::GatherV2::Attrs | GatherV2 için isteğe bağlı özellik ayarlayıcıları. |
Genel özellikler
operasyon
Operation operation
çıktı
::tensorflow::Output output
Kamusal işlevler
ToplaV2
GatherV2( const ::tensorflow::Scope & scope, ::tensorflow::Input params, ::tensorflow::Input indices, ::tensorflow::Input axis )
ToplaV2
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
Herkese açık statik fonksiyonlar
Parti Boyutları
Attrs BatchDims( int64 x )