Computes gradients for SparseSegmentMean.
tf.raw_ops.SparseSegmentMeanGradV2(
grad, indices, segment_ids, dense_output_dim0, name=None
)
Returns tensor "output" with same shape as grad, except for dimension 0 whose value is the number of unique indexes in "indices". Also returns vector "sorted_unique_indices" containing the corresponding indexes from "indices".
Args |
|---|
grad
Tensor. Must be one of the following types: bfloat16, half, float32, float64.
gradient propagated to the SparseSegmentMean op.
indices
Tensor. Must be one of the following types: int32, int64.
indices passed to the corresponding SparseSegmentMean op.
segment_ids
Tensor. Must be one of the following types: int32, int64.
segment_ids passed to the corresponding SparseSegmentMean op.
dense_output_dim0
Tensor of type int32.
dimension 0 of "data" passed to SparseSegmentMean op.
name
Returns | |
|---|---|
A tuple of Tensor objects (output, sorted_unique_indices).
|
|
output
|
A Tensor. Has the same type as grad.
|
sorted_unique_indices
|
A Tensor. Has the same type as indices.
|