przepływ tensorowy:: ops:: SparseApplyProximalGradientDescent

#include <training_ops.h>

Rzadka aktualizacja „*var” jako algorytmu FOBOS ze stałą szybkością uczenia się.

Streszczenie

To znaczy dla wierszy, dla których mamy grad, aktualizujemy var w następujący sposób: $$prox_v = var - alpha * grad$$ $$var = sign(prox_v)/(1+alpha*l2) * max{|prox_v|-alpha*l1,0}$$

Argumenty:

  • zakres: Obiekt Scope
  • var: Powinien pochodzić ze zmiennej ().
  • alfa: współczynnik skalowania. Musi być skalarem.
  • l1: Regularyzacja L1. Musi być skalarem.
  • l2: Regularyzacja L2. Musi być skalarem.
  • grad: gradient.
  • indeksy: wektor indeksów do pierwszego wymiaru var i accum.

Opcjonalne atrybuty (patrz Attrs ):

  • use_locking: Jeśli True, odejmowanie będzie chronione blokadą; w przeciwnym razie zachowanie jest niezdefiniowane, ale może wykazywać mniejszą rywalizację.

Zwroty:

  • Output : takie same jak „var”.

Konstruktory i destruktory

SparseApplyProximalGradientDescent (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input alpha, :: tensorflow::Input l1, :: tensorflow::Input l2, :: tensorflow::Input grad, :: tensorflow::Input indices)
SparseApplyProximalGradientDescent (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input alpha, :: tensorflow::Input l1, :: tensorflow::Input l2, :: tensorflow::Input grad, :: tensorflow::Input indices, const SparseApplyProximalGradientDescent::Attrs & attrs)

Atrybuty publiczne

operation
out

Funkcje publiczne

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

Publiczne funkcje statyczne

UseLocking (bool x)

Struktury

tensorflow:: ops:: SparseApplyProximalGradientDescent:: Attrs

Opcjonalne moduły ustawiające atrybuty dla SparseApplyProximalGradientDescent .

Atrybuty publiczne

operacja

Operation operation

na zewnątrz

::tensorflow::Output out

Funkcje publiczne

SparseApplyProximalGradientDescent

 SparseApplyProximalGradientDescent(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input alpha,
  ::tensorflow::Input l1,
  ::tensorflow::Input l2,
  ::tensorflow::Input grad,
  ::tensorflow::Input indices
)

SparseApplyProximalGradientDescent

 SparseApplyProximalGradientDescent(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input alpha,
  ::tensorflow::Input l1,
  ::tensorflow::Input l2,
  ::tensorflow::Input grad,
  ::tensorflow::Input indices,
  const SparseApplyProximalGradientDescent::Attrs & attrs
)

węzeł

::tensorflow::Node * node() const 

operator::tensorflow::Wejście

 operator::tensorflow::Input() const 

operator::tensorflow::Wyjście

 operator::tensorflow::Output() const 

Publiczne funkcje statyczne

Użyj Blokowania

Attrs UseLocking(
  bool x
)