SparseAccumulatorApplyGradient
tensorflow C++ API
tensorflow::ops::SparseAccumulatorApplyGradient
Applies a sparse gradient to a given accumulator.
Summary
Does not add if local_step is smaller than the accumulator’s global_step.
Arguments:
- scope: A Scope object
- handle: The handle to a accumulator.
- local_step: The local_step value at which the sparse gradient was computed.
- gradient_indices: Indices of the sparse gradient to be accumulated. Must be a vector.
- gradient_values: Values are the non-zero slices of the gradient, and must have the same first dimension as indices, i.e., the nnz represented by indices and values must be consistent.
- gradient_shape: Shape of the sparse gradient to be accumulated.
- has_known_shape: Boolean indicating whether gradient_shape is unknown, in which case the input is ignored during validation.
Returns:
- the created Operation
Constructor
- SparseAccumulatorApplyGradient(const ::tensorflow::Scope & scope, ::tensorflow::Input handle, ::tensorflow::Input local_step, ::tensorflow::Input gradient_indices, ::tensorflow::Input gradient_values, ::tensorflow::Input gradient_shape, bool has_known_shape).
Public attributes
- tensorflow::Operation operation
SparseAccumulatorApplyGradient block
Source link : https://github.com/EXPNUNI/enuSpace-Tensorflow/blob/master/enuSpaceTensorflow/tf_data_flow_ops.cpp
Argument:
- Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.)
- handle : connect Input node.
- local_step : connect Input node or input a int64 number.
- gradient_indices : connect Input node.
- gradient_values : connect Input node.
- gradient_shape : connect Input node or input a shape. ex) {5,2}.
- has_known_shape : connect Input node or input a bool data. ex) true or false;
Return:
- Operation operation: Operation operation of SparseConditionalAccumulator class object.
Result:
- std::vector(Tensor) product_result : Returned object of executed result by calling session.