Sparse Row Float Tensor
A sparse row float tensor, which is a FloatTensor of rank 2 which has sparse rows (e.g. has rows that are empty/zero). This data format is particularly useful for embedding table gradients.
Example: For this 4x3 tensor: 7 7 7 7 0 0 0 0 8 8 8 8
The sparse row data will be: 0 7 7 7 7 2 8 8 8 8 (shape: 3, 4) Note that the rows must be in order by index, so this is not valid (behavior is undefined): 2 8 8 8 8 0 7 7 7 7 (shape: 3, 4)
Functions
map for when the function is not pure.
zip for when the function is not pure.
zip2 for when the function is not pure.
Return an equivalent tensor whose representation is a StridedFloatTensor with natural layout and zero offset (that is, with a contiguous data representation).
Computes the tensor index corresponding to the position in normal form.