tensorflow::ops::ResourceSparseApplyKerasMomentum

#include <training_ops.h>

'*var' ve '*accum' içindeki ilgili girdileri, ivme şemasına göre güncelleyin.

Özet

Nesterov momentumunu kullanmak istiyorsanız use_nesterov = True olarak ayarlayın.

Yani, notunu aldığımız satırlar için, var ve accum'u aşağıdaki gibi güncelliyoruz:

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

Argümanlar:

  • kapsam: Bir Kapsam nesnesi
  • var: Bir Variable() türünden gelmelidir.
  • accum: Bir Variable() türünden gelmelidir.
  • lr: Öğrenme oranı. Skaler bir değer olmalıdır.
  • grad: Eğim.
  • İndeksler: Var ve accum'un birinci boyutuna ait indekslerin vektörü.
  • momentum: Momentum. Skaler bir sayı olmalıdır.

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

  • use_locking: True ise, var ve accum tensörlerinin güncellenmesi bir kilit ile korunacaktır; aksi takdirde davranış tanımsızdır, ancak daha az çekişme gösterebilir.
  • use_nesterov: Eğer True ise, grad hesaplamasına geçirilen tensör var + momentum * accum olacaktır, dolayısıyla sonuçta elde ettiğiniz var aslında var + momentum * accum'dur.

İ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

Herkese açık statik fonksiyonlar

UseLocking (bool x)
UseNesterov (bool x)

Yapılar

tensorflow::ops::ResourceSparseApplyKerasMomentum::Attrs

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

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
)

operatör::tensorflow::İşlem

 operator::tensorflow::Operation() const 

Herkese açık statik fonksiyonlar

KullanımKilitleme

Attrs UseLocking(
  bool x
)

UseNesterov

Attrs UseNesterov(
  bool x
)