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

tensorflow :: ops :: ResourceSparseApplyKerasMomentum

#include <training_ops.h>

Momentum şemasına göre '* var' ve '* biriktirme' içindeki ilgili girişleri güncelleyin.

Özet

Nesterov momentum kullanmak istiyorsanız use_nesterov = True ayarlayın.

Yani not verdiğimiz satırlar için var ve biriktirmeyi şu şekilde güncelliyoruz:

birikim = birikim * momentum - lr * grad var + = birikim

Argümanlar:

  • kapsam: Bir Scope nesnesi
  • var: Değişken () 'den olmalıdır.
  • birikim: Bir Değişken () 'den olmalıdır.
  • lr: Öğrenme oranı. Skaler olmalı.
  • grad: Gradyan.
  • indisler: var ve akümül'ün ilk boyutundaki indislerin bir vektörü.
  • momentum: Momentum. Skaler olmalı.

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

  • use_locking: True ise, var ve akümülörlerin güncellenmesi bir kilit ile korunacaktır; aksi takdirde davranış tanımsızdır, ancak daha az çekişme gösterebilir.
  • use_nesterov: True , grad'ı hesaplamak için aktarılan tensör var + momentum * biriktir, yani sonunda elde ettiğiniz var aslında var + momentum * biriktir.

İadeler:

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

ResourceSparseApplyKerasMomentum (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input lr, :: tensorflow::Input grad, :: tensorflow::Input indices, :: tensorflow::Input momentum)
ResourceSparseApplyKerasMomentum (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input lr, :: tensorflow::Input grad, :: tensorflow::Input indices, :: tensorflow::Input momentum, const ResourceSparseApplyKerasMomentum::Attrs & attrs)

Genel özellikler

operation

Kamusal işlevler

operator::tensorflow::Operation () const

Genel statik işlevler

UseLocking (bool x)
UseNesterov (bool x)

Yapılar

tensorflow :: ops :: ResourceSparseApplyKerasMomentum :: Attrs

ResourceSparseApplyKerasMomentum için isteğe bağlı öznitelik belirleyiciler.

Genel özellikler

operasyon

Operation operation

Kamusal işlevler

ResourceSparseApplyKerasMomentum

 ResourceSparseApplyKerasMomentum(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input lr,
  ::tensorflow::Input grad,
  ::tensorflow::Input indices,
  ::tensorflow::Input momentum
)

ResourceSparseApplyKerasMomentum

 ResourceSparseApplyKerasMomentum(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input lr,
  ::tensorflow::Input grad,
  ::tensorflow::Input indices,
  ::tensorflow::Input momentum,
  const ResourceSparseApplyKerasMomentum::Attrs & attrs
)

operator :: tensorflow :: İşlem

 operator::tensorflow::Operation() const 

Genel statik işlevler

KullanımKilitleme

Attrs UseLocking(
  bool x
)

KullanımNesterov

Attrs UseNesterov(
  bool x
)