aliran tensor:: operasi:: ResourceApplyFtrlV2

#include <training_ops.h>

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

Ringkasan

grad_with_shrinkage = grad + 2 * l2_shrinkage * var accum_new = accum + grad_with_shrinkage * grad_with_shrinkage linier += grad_with_shrinkage + (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: Regulariasi L1. Pasti skalar.
  • l2: Regulariasi penyusutan 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:

Konstruktor dan Destruktor

ResourceApplyFtrlV2 (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 l2_shrinkage, :: tensorflow::Input lr_power)
ResourceApplyFtrlV2 (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 l2_shrinkage, :: tensorflow::Input lr_power, const ResourceApplyFtrlV2::Attrs & attrs)

Atribut publik

operation

Fungsi publik

operator::tensorflow::Operation () const

Fungsi statis publik

UseLocking (bool x)

Struktur

tensorflow:: ops:: ResourceApplyFtrlV2:: Attrs

Penyetel atribut opsional untuk ResourceApplyFtrlV2 .

Atribut publik

operasi

Operation operation

Fungsi publik

ResourceApplyFtrlV2

 ResourceApplyFtrlV2(
  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 l2_shrinkage,
  ::tensorflow::Input lr_power
)

ResourceApplyFtrlV2

 ResourceApplyFtrlV2(
  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 l2_shrinkage,
  ::tensorflow::Input lr_power,
  const ResourceApplyFtrlV2::Attrs & attrs
)

operator::tensorflow::Operasi

 operator::tensorflow::Operation() const 

Fungsi statis publik

Gunakan Penguncian

Attrs UseLocking(
  bool x
)