The gradient of SparseFillEmptyRows.
tf.raw_ops.SparseFillEmptyRowsGrad( reverse_index_map, grad_values, name=None )
Takes vectors reverse_index_map, shaped [N]
, and grad_values, shaped [N_full]
, where N_full >= N
and copies data into either d_values
or d_default_value
. Here d_values
is shaped [N]
and d_default_value
is a scalar.
d_values[j] = grad_values[reverse_index_map[j]] d_defaultvalue = sum{k : 0 .. N_full - 1} ( grad_values[k] * 1{k not in reverse_index_map})
Args | |
---|---|
reverse_index_map | A Tensor of type int64 . 1-D. The reverse index map from SparseFillEmptyRows. |
grad_values | A Tensor . 1-D. The gradients from backprop. |
name | A name for the operation (optional). |
Returns | |
---|---|
A tuple of Tensor objects (d_values, d_default_value). | |
d_values | A Tensor . Has the same type as grad_values . |
d_default_value | A Tensor . Has the same type as grad_values . |
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.4/api_docs/python/tf/raw_ops/SparseFillEmptyRowsGrad