Halaman ini diterjemahkan oleh Cloud Translation API.
Switch to English

tensorflow :: ops :: ResourceSparseApplyFtrlV2

#include <training_ops.h>

Memperbarui entri yang relevan di '* var' sesuai dengan skema Ftrl-proksimal.

Ringkasan

Itu untuk baris kami telah grad untuk, kami memperbarui var, accum dan linear sebagai berikut: grad_with_shrinkage = grad + 2 * l2_shrinkage * var accum_new = accum + grad_with_shrinkage * grad_with_shrinkage linear + = grad_with_shrinkage + (accum_new ^ (- lr_power) - accum ^ (-lr_power)) / lr * var kuadrat = 1.0 / (accum_new ^ (lr_power) * lr) + 2 * l2 var = (tanda (linear) * l1 - linear) / kuadrat jika | linear | > L1 lain 0.0 accum = accum_new

argumen:

  • Ruang lingkup: Sebuah Ruang Lingkup objek
  • var: Harus dari Variable a ().
  • accum: Harus dari Variable a ().
  • linear: Harus dari Variable a ().
  • grad: gradien The.
  • indeks: Sebuah vektor indeks ke dalam dimensi pertama var dan accum.
  • lr: Scaling faktor. Harus skalar.
  • l1: L1 regularisasi. Harus skalar.
  • l2: L2 susut regularisasi. Harus skalar.
  • lr_power: faktor Scaling. Harus skalar.

Atribut opsional (lihat Attrs ):

  • use_locking: Jika True , pemutakhiran var dan accum tensor akan dilindungi oleh kunci; jika perilaku tidak terdefinisi, tapi mungkin menunjukkan kurang pertentangan.

Pengembalian:

Konstruktor dan Destructors

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

atribut umum

operation

fungsi publik

operator::tensorflow::Operation () const

fungsi public static

MultiplyLinearByLr (bool x)
UseLocking (bool x)

struct

tensorflow :: ops :: ResourceSparseApplyFtrlV2 :: attrs

Setter atribut opsional untuk ResourceSparseApplyFtrlV2 .

atribut umum

operasi

 Operation operation

fungsi publik

ResourceSparseApplyFtrlV2

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

ResourceSparseApplyFtrlV2

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

Operator :: tensorflow :: Operasi

 operator::tensorflow::Operation() const 

fungsi public static

MultiplyLinearByLr

 Attrs MultiplyLinearByLr(
  bool x
)

UseLocking

 Attrs UseLocking(
  bool x
)