Link Search Menu Expand Document

ApplyProximalAdagrad


tensorflow C++ API

tensorflow::ops::ApplyProximalAdagrad

Update ‘*var’ and ‘*accum’ according to FOBOS with Adagrad learning rate.


Summary

accum += grad * grad prox_v = var - lr * grad * (1 / sqrt(accum)) var = sign(prox_v)/(1+lr*l2) * max{|prox_v|-lr*l1,0}

Arguments:

  • scope: A Scope object
  • var: Should be from a Variable().
  • accum: Should be from a Variable().
  • lr: Scaling factor. Must be a scalar.
  • l1: L1 regularization. Must be a scalar.
  • l2: L2 regularization. Must be a scalar.
  • grad: The gradient.

Optional attributes (seeAttrs):

  • use_locking: If True, updating of the var and accum tensors will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.

Returns:


ApplyProximalAdagrad block

Source link : https://github.com/EXPNUNI/enuSpaceTensorflow/blob/master/enuSpaceTensorflow/tf_training.cpp

Argument:

  • Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.)
  • Input var: connect Input node.
  • Input accum: connect Input node.
  • Input lr: connect Input node.
  • Input l1: connect Input node.
  • Input l2: connect Input node.
  • Input grad: connect Input node.
  • ApplyProximalAdagrad ::Attrs attrs : Input attrs in value. ex) use_locking_ = false;

Return:

  • Output output : Output object of ApplyProximalAdagrad class object.

Result:

  • std::vector(Tensor) result_output : Returned object of executed result by calling session.

Using Method