tensor akışı:: işlem:: KaynakApplyKerasMomentum

#include <training_ops.h>

Momentum şemasına göre '*var'ı güncelleyin.

Özet

Nesterov momentumunu kullanmak istiyorsanız use_nesterov = True değerini ayarlayın.

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

Argümanlar:

  • kapsam: Bir Kapsam nesnesi
  • var: Bir Variable()'dan olmalıdır.
  • accum: Bir Variable()'dan olmalıdır.
  • lr: Ölçeklendirme faktörü. Bir skaler olmalı.
  • grad: Gradyan.
  • momentum: momentum. Bir skaler olmalı.

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

  • use_locking: True ise, var ve accum tensörlerinin güncellenmesi bir kilitle korunacaktır; aksi takdirde davranış tanımsızdır ancak daha az çekişme sergileyebilir.
  • use_nesterov: Eğer True ise, hesaplama derecesine iletilen tensör var + momentum * accum olacaktır, yani sonuçta elde ettiğiniz var aslında var + momentum * accum olacaktır.

İadeler:

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

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

Genel özellikler

operation

Kamu işlevleri

operator::tensorflow::Operation () const

Genel statik işlevler

UseLocking (bool x)
UseNesterov (bool x)

Yapılar

tensorflow:: ops:: ResourceApplyKerasMomentum:: Öznitelikler

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

Genel özellikler

operasyon

Operation operation

Kamu işlevleri

KaynakApplyKerasMomentum

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

KaynakApplyKerasMomentum

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

operatör::tensorflow::İşlem

 operator::tensorflow::Operation() const 

Genel statik işlevler

KullanımKilitleme

Attrs UseLocking(
  bool x
)

KullanımNesterov

Attrs UseNesterov(
  bool x
)