Google I/O'yu ayarladığınız için teşekkür ederiz. İsteğe bağlı olarak tüm oturumları görüntüleyin İsteğe bağlı olarak izleyin

tensör akışı:: operasyon:: toplaV2

#include <array_ops.h>

params eksen axis indices göre dilimleri toplayın .

Özet

indices , herhangi bir boyutun (genellikle 0-D veya 1-D) bir tamsayı tensörü olmalıdır. params.shape[:axis] + indices.shape + params.shape[axis + 1:] şeklinde bir çıkış tensörü üretir:

    # 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üldüğünü unutmayın. GPU'da, sınır dışı bir dizin bulunursa, karşılık gelen çıkış değerinde bir 0 depolanı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 rank axis + 1 olmalıdır.
  • indeksler: İndeks tensörü. [0, params.shape[axis]) aralığında olmalıdır.
  • axis: params içindeki indices toplanacağı eksen. İlk boyut için varsayılandır. Negatif indeksleri destekler.

İadeler:

  • Output : şekil params.shape[:axis] + indices.shape + params.shape[axis + 1:] ile indices tarafından verilen indekslerden toplanan params 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:: Attrs

GatherV2 için isteğe bağlı öznitelik ayarlayıcılar.

Genel özellikler

operasyon

Operation operation

çıktı

::tensorflow::Output output

Kamu işlevleri

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::Çıkış

 operator::tensorflow::Output() const 

Genel statik işlevler

Toplu Karartmalar

Attrs BatchDims(
  int64 x
)