View source on GitHub
|
Reshapes a SparseTensor to represent values in a new dense shape.
tfra.dynamic_embedding.math.sparse_reshape(
sp_input,
shape,
name=None
)It does same things as tf.sparse.reshape. Here we provide GPU implement.
Go TF API for more details.
sp_input: The inputSparseTensor.shape: A 1-D (vector) int64Tensorspecifying the new dense shape of the representedSparseTensor.name: A name prefix for the returned tensors (optional).
A SparseTensor with the same non-empty values but with indices calculated
by the new dense shape.
View source on GitHub