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 :: ResourceApplyMomentum

#include <training_ops.h>

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

Özet

Use_nesterov = True olarak ayarlayın

Nesterov momentumunu kullanmak istiyorum.

birikim = birikim * momentum + grad var - = lr * 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: Ölçekleme faktörü. Skaler olmalı.
  • grad: Gradyan.
  • 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 - lr * momentum * birikim olacaktır, bu yüzden sonunda elde ettiğiniz değişken aslında var - lr * momentum * biriktir.

İadeler:

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

ResourceApplyMomentum (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input lr, :: tensorflow::Input grad, :: tensorflow::Input momentum)
ResourceApplyMomentum (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input lr, :: tensorflow::Input grad, :: tensorflow::Input momentum, const ResourceApplyMomentum::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 :: ResourceApplyMomentum :: Attrs

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

Genel özellikler

operasyon

Operation operation

Kamusal işlevler

ResourceApplyMomentum

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

ResourceApplyMomentum

 ResourceApplyMomentum(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input lr,
  ::tensorflow::Input grad,
  ::tensorflow::Input momentum,
  const ResourceApplyMomentum::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
)