Halaman ini diterjemahkan oleh Cloud Translation API.
Switch to English

tensorflow :: ops :: TerapkanFtrlV2

#include <training_ops.h>

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

Ringkasan

grad_with_shrinkage = grad + 2 * l2_shrinkage * var acc_new = akum + grad_with_shrinkage * grad_with_shrinkage linear + = grad_with_shrinkage + (akum_with ^ (- lr_power) - akum ^ (- lr_power)) / lr * var kuadrat = 1.0 / l * lr) + 2 * l2 var = (tanda (linier) * l1 - linier) / kuadrat jika | linier | > l1 lain 0,0 akum = akum_new

Argumen:

  • scope: Objek Scope
  • var: Harus dari Variabel ().
  • akumulasi: Harus dari Variabel ().
  • linear: Harus dari Variabel ().
  • grad: Gradien.
  • lr: Faktor penskalaan. Harus skalar.
  • l1: regularisasi L1. Harus skalar.
  • l2: pengaturan penyusutan L2. Harus skalar.
  • lr_power: Faktor penskalaan. Harus skalar.

Atribut opsional (lihat Attrs ):

  • use_locking: Jika True , pembaruan tensor var dan akumulator akan dilindungi oleh kunci; jika tidak, perilakunya tidak ditentukan, tetapi mungkin menunjukkan lebih sedikit perselisihan.

Pengembalian:

  • Output : Sama seperti "var".

Pembuat dan Penghancur

ApplyFtrlV2 (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)
ApplyFtrlV2 (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 ApplyFtrlV2::Attrs & attrs)

Atribut publik

operation
out

Fungsi publik

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

Fungsi statis publik

UseLocking (bool x)

Structs

tensorflow :: ops :: ApplyFtrlV2 :: Attrs

Penyetel atribut opsional untuk ApplyFtrlV2 .

Atribut publik

operasi

Operation operation

di luar

::tensorflow::Output out

Fungsi publik

TerapkanFtrlV2

 ApplyFtrlV2(
  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
)

TerapkanFtrlV2

 ApplyFtrlV2(
  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 ApplyFtrlV2::Attrs & attrs
)

simpul

::tensorflow::Node * node() const 

operator :: tensorflow :: Input

 operator::tensorflow::Input() const 

operator :: tensorflow :: Keluaran

 operator::tensorflow::Output() const 

Fungsi statis publik

UseLocking

Attrs UseLocking(
  bool x
)