SparseFillEmptyRowsGrad
tensorflow C++ API
tensorflow::ops::SparseFillEmptyRowsGrad
The gradient of SparseFillEmptyRows.
Summary
Takes vectors reverse_index_map, shaped[N]
, and grad_values, shaped[N_full]
, whereN_full >= N
and copies data into eitherd_values
ord_default_value
. Hered_values
is shaped[N]
andd_default_value
is a scalar.
d_values[j] = grad_values[reverse_index_map[j]] d_default_value = sum_{k : 0 .. N_full - 1} ( grad_values[k] * 1{k not in reverse_index_map})
Arguments:
- scope: A Scope object
- reverse_index_map: 1-D. The reverse index map from SparseFillEmptyRows.
- grad_values: 1-D. The gradients from backprop.
Returns:
Output
d_values: 1-D. The backprop into values.Output
d_default_value: 0-D. The backprop into default_value.
SparseFillEmptyRowsGrad block
Source link : https://github.com/EXPNUNI/enuSpaceTensorflow/blob/master/enuSpaceTensorflow/tf_sparse.cpp
Argument:
- Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.)
- Input reverse_index_map: connect Input node.
- Input grad_values: connect Input node.
Return:
- Output d_values: Output object of SparseFillEmptyRowsGrad class object.
- Output d_default_value: Output object of SparseFillEmptyRowsGrad class object.
Result:
- std::vector(Tensor) result_d_values : Returned object of executed result by calling session.
- std::vector(Tensor) result_d_default_value : Returned object of executed result by calling session.