aliran tensor:: operasi:: TerapkanFtrl

#include <training_ops.h>

Perbarui '*var' sesuai dengan skema Ftrl-proksimal.

Ringkasan

accum_new = accum + grad * grad linear += grad - (accum_new^(-lr_power) - accum^(-lr_power)) / lr * var kuadrat = 1,0 / (accum_new^(lr_power) * lr) + 2 * l2 var = (tanda(linier) * l1 - linier) / kuadrat jika |linier| > l1 lain 0,0 akumulasi = akumulasi_baru

Argumen:

  • ruang lingkup: Objek Lingkup
  • var: Harus dari Variabel().
  • accum: Harus dari Variabel().
  • linier: Harus dari Variabel().
  • lulusan: Gradien.
  • lr: Faktor penskalaan. Pasti skalar.
  • l1: Regularisasi L1. Pasti skalar.
  • l2: Regularisasi L2. Pasti skalar.
  • lr_power: Faktor penskalaan. Pasti skalar.

Atribut opsional (lihat Attrs ):

  • use_locking: Jika True , pembaruan tensor var dan accum akan dilindungi oleh kunci; jika tidak, perilaku tersebut tidak terdefinisikan, namun mungkin menunjukkan lebih sedikit pertentangan.

Pengembalian:

  • Output : Sama seperti "var".

Konstruktor dan Destruktor

ApplyFtrl (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input linear, :: tensorflow::Input grad, :: tensorflow::Input lr, :: tensorflow::Input l1, :: tensorflow::Input l2, :: tensorflow::Input lr_power)
ApplyFtrl (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input linear, :: tensorflow::Input grad, :: tensorflow::Input lr, :: tensorflow::Input l1, :: tensorflow::Input l2, :: tensorflow::Input lr_power, const ApplyFtrl::Attrs & attrs)

Atribut publik

operation
out

Fungsi publik

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

Fungsi statis publik

MultiplyLinearByLr (bool x)
UseLocking (bool x)

Struktur

tensorflow:: ops:: ApplyFtrl:: Attrs

Penyetel atribut opsional untuk ApplyFtrl .

Atribut publik

operasi

Operation operation

keluar

::tensorflow::Output out

Fungsi publik

TerapkanFtrl

 ApplyFtrl(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input linear,
  ::tensorflow::Input grad,
  ::tensorflow::Input lr,
  ::tensorflow::Input l1,
  ::tensorflow::Input l2,
  ::tensorflow::Input lr_power
)

TerapkanFtrl

 ApplyFtrl(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input linear,
  ::tensorflow::Input grad,
  ::tensorflow::Input lr,
  ::tensorflow::Input l1,
  ::tensorflow::Input l2,
  ::tensorflow::Input lr_power,
  const ApplyFtrl::Attrs & attrs
)

simpul

::tensorflow::Node * node() const 

operator::tensorflow::Masukan

 operator::tensorflow::Input() const 

operator::tensorflow::Keluaran

 operator::tensorflow::Output() const 

Fungsi statis publik

KalikanLinearByLr

Attrs MultiplyLinearByLr(
  bool x
)

Gunakan Penguncian

Attrs UseLocking(
  bool x
)