przepływ tensorowy:: ops:: SparseApplyProximalAdagrad

#include <training_ops.h>

Rzadkie wpisy aktualizacji w '*var' i '*accum' zgodnie z algorytmem FOBOS.

Streszczenie

Oznacza to, że dla wierszy, dla których mamy grad, aktualizujemy var i accum w następujący sposób: $$accum += grad * grad$$ $$prox_v = var$$ $$prox_v -= lr * grad * (1 / sqrt(accum))$$ $$var = sign(prox_v)/(1+lr*l2) * max{|prox_v|-lr*l1,0}$$

Argumenty:

  • zakres: Obiekt Scope
  • var: Powinien pochodzić ze zmiennej ().
  • accum: Powinien pochodzić ze zmiennej ().
  • lr: Szybkość uczenia się. 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, aktualizacja tensorów var i accum będzie chroniona blokadą; w przeciwnym razie zachowanie jest niezdefiniowane, ale może wykazywać mniejszą rywalizację.

Zwroty:

  • Output : takie same jak „var”.

Konstruktory i destruktory

SparseApplyProximalAdagrad (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input lr, :: tensorflow::Input l1, :: tensorflow::Input l2, :: tensorflow::Input grad, :: tensorflow::Input indices)
SparseApplyProximalAdagrad (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input lr, :: tensorflow::Input l1, :: tensorflow::Input l2, :: tensorflow::Input grad, :: tensorflow::Input indices, const SparseApplyProximalAdagrad::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:: SparseApplyProximalAdagrad:: Attrs

Opcjonalne moduły ustawiające atrybuty dla SparseApplyProximalAdagrad .

Atrybuty publiczne

operacja

Operation operation

na zewnątrz

::tensorflow::Output out

Funkcje publiczne

SparseApplyProximalAdagrad

 SparseApplyProximalAdagrad(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input lr,
  ::tensorflow::Input l1,
  ::tensorflow::Input l2,
  ::tensorflow::Input grad,
  ::tensorflow::Input indices
)

SparseApplyProximalAdagrad

 SparseApplyProximalAdagrad(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input lr,
  ::tensorflow::Input l1,
  ::tensorflow::Input l2,
  ::tensorflow::Input grad,
  ::tensorflow::Input indices,
  const SparseApplyProximalAdagrad::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
)