tensorflow::ops::ScatterNdUpdate

#include <state_ops.h>

Verilen bir küme içindeki tek tek değerlere veya dilimlere seyrek updates uygular.

Özet

indices göre değişken.

ref P mertebesinde bir Tensor ve indices Q mertebesinde bir Tensor .

indices , ref ait indeksleri içeren tamsayı tensör olmalıdır. Şekli de belirtilmelidir. \([d_0, ..., d_{Q-2}, K]\) burada 0 < K <= P .

indices en içteki boyutu ( K uzunluğunda), ref K boyutu boyunca elemanlara ( K = P ise) veya dilimlere ( K < P ise) ait indekslere karşılık gelir.

updates Q-1+PK mertebesinde ve şu şekle sahip Tensor :

$$[d_0, ..., d_{Q-2}, ref.shape[K], ..., ref.shape[P-1]].$$

Örneğin, 4 dağınık elemanı olan bir rank-1 tensörünü 8 elemanlı bir tensöre güncellemek istediğimizi varsayalım. Python'da bu güncelleme şu şekilde görünür:

    ref = tf.Variable([1, 2, 3, 4, 5, 6, 7, 8])
    indices = tf.constant([[4], [3], [1] ,[7]])
    updates = tf.constant([9, 10, 11, 12])
    update = tf.scatter_nd_update(ref, indices, updates)
    with tf.Session() as sess:
      print sess.run(update)

Sonuç olarak, referans dosyasında yapılacak güncelleme şu şekilde olacaktır:

[1, 11, 3, 10, 9, 6, 7, 12]

Dilimlerde nasıl güncellemeler yapılacağına dair daha fazla bilgi için tf.scatter_nd bakın.

Ayrıca tf.scatter_update ve tf.batch_scatter_update fonksiyonlarına da bakınız.

Argümanlar:

  • kapsam: Bir Kapsam nesnesi
  • ref: Değiştirilebilir bir Tensor . Bir Variable düğümünden gelmelidir.
  • İndeksler: Bir Tensor . Şu türlerden biri olmalıdır: int32, int64. ref'e indekslerin tensörü.
  • Güncellemeler: Bir Tensor . ref ile aynı türde olmalıdır. ref'e eklenecek güncellenmiş değerlerin tensörü.

İsteğe bağlı özellikler (bkz. Attrs ):

  • use_locking: İsteğe bağlı bir boolean değer. Varsayılan değeri True'dur. True ise, atama bir kilit ile korunacaktır; aksi takdirde davranış tanımsızdır, ancak daha az çekişme gösterebilir.

İadeler:

  • Output : Referansla aynı. Güncelleme işlemi tamamlandıktan sonra güncellenmiş değerleri kullanmak isteyen işlemler için kolaylık sağlamak amacıyla döndürülür.

Yapıcılar ve Yıkıcılar

ScatterNdUpdate (const :: tensorflow::Scope & scope, :: tensorflow::Input ref, :: tensorflow::Input indices, :: tensorflow::Input updates)
ScatterNdUpdate (const :: tensorflow::Scope & scope, :: tensorflow::Input ref, :: tensorflow::Input indices, :: tensorflow::Input updates, const ScatterNdUpdate::Attrs & attrs)

Genel özellikler

operation
output_ref

Kamusal işlevler

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

Herkese açık statik fonksiyonlar

UseLocking (bool x)

Yapılar

tensorflow::ops::ScatterNdUpdate::Attrs

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

Genel özellikler

operasyon

Operation operation

çıktı_referansı

::tensorflow::Output output_ref

Kamusal işlevler

ScatterNdUpdate

 ScatterNdUpdate(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input ref,
  ::tensorflow::Input indices,
  ::tensorflow::Input updates
)

ScatterNdUpdate

 ScatterNdUpdate(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input ref,
  ::tensorflow::Input indices,
  ::tensorflow::Input updates,
  const ScatterNdUpdate::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

KullanımKilitleme

Attrs UseLocking(
  bool x
)