Skip to content

Latest commit

 

History

History
56 lines (37 loc) · 1.36 KB

File metadata and controls

56 lines (37 loc) · 1.36 KB

tfra.dynamic_embedding.math.sparse_reshape

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.

Args:

  • sp_input: The input SparseTensor.
  • shape: A 1-D (vector) int64 Tensor specifying the new dense shape of the represented SparseTensor.
  • name: A name prefix for the returned tensors (optional).

Returns:

A SparseTensor with the same non-empty values but with indices calculated by the new dense shape.