ApplyProximalGradientDescent
tensorflow C++ API
tensorflow::ops::ApplyProximalGradientDescent
Update ‘*var’ as FOBOS algorithm with fixed learning rate.
Summary
prox_v = var - alpha * delta var = sign(prox_v)/(1+alpha*l2) * max{|prox_v|-alpha*l1,0}
Arguments:
- scope: A Scope object
- var: Should be from a Variable().
- alpha: Scaling factor. Must be a scalar.
- l1: L1 regularization. Must be a scalar.
- l2: L2 regularization. Must be a scalar.
- delta: The change.
Optional attributes (seeAttrs
):
- use_locking: If True, the subtraction will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.
Returns:
Output
: Same as “var”.
ApplyProximalGradientDescent 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 alpha: connect Input node.
- Input l1: connect Input node.
- Input l2: connect Input node.
- Input delta: connect Input node.
- ApplyProximalGradientDescent ::Attrs attrs : Input attrs in value. ex) use_locking_ = false;
Return:
- Output output : Output object of ApplyProximalGradientDescent class object.
Result:
- std::vector(Tensor) result_output : Returned object of executed result by calling session.