aliran tensor:: operasi:: ResourceApplyFtrl
#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:
-
Operation
yang dibuat
Konstruktor dan Destruktor | |
---|---|
ResourceApplyFtrl (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) | |
ResourceApplyFtrl (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 ResourceApplyFtrl::Attrs & attrs) |
Atribut publik | |
---|---|
operation |
Fungsi publik | |
---|---|
operator::tensorflow::Operation () const |
Fungsi statis publik | |
---|---|
MultiplyLinearByLr (bool x) | |
UseLocking (bool x) |
Struktur | |
---|---|
tensorflow:: ops:: ResourceApplyFtrl:: Attrs | Penyetel atribut opsional untuk ResourceApplyFtrl . |
Atribut publik
operasi
Operation operation
Fungsi publik
ResourceApplyFtrl
ResourceApplyFtrl( 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 )
ResourceApplyFtrl
ResourceApplyFtrl( 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 ResourceApplyFtrl::Attrs & attrs )
operator::tensorflow::Operasi
operator::tensorflow::Operation() const
Fungsi statis publik
KalikanLinearByLr
Attrs MultiplyLinearByLr( bool x )
Gunakan Penguncian
Attrs UseLocking( bool x )