Data type of these tensor indexed slices.
Data type of these tensor indexed slices.
Shape of the corresponding dense Tensor.
Device on which these tensor indexed slices will be placed.
Device on which these tensor indexed slices will be placed.
Indices along the first dimension of the corresponding dense Tensor.
Shape of these tensor indexed slices.
Shape of these tensor indexed slices.
Returns the Tensor that this TensorLike object represents.
Returns the Tensor that this TensorLike object represents.
Returns an TensorIndexedSlices that has the same value as this TensorLike.
Returns an TensorIndexedSlices that has the same value as this TensorLike.
TensorIndexedSlices that has the same value as this TensorLike.
Values corresponding to the provided indices.
Sparse representation of a set of tensor slices at given indices.
This class if a simple wrapper for a pair (or a set of three) of Tensor objects:
indices
: A one-dimensional integer Tensor with shape[D0]
.values
: An Tensor of any data type, with shape[D0, D1, ..., Dn]
.denseShape
: Optionally, an integer Tensor with shape[LARGE0, D1, ..., Dn]
.An TensorIndexedSlices is typically used to represent a subset of a larger Output,
dense
, of shape[LARGE0, D1, ..., Dn]
, whereLARGE0 >> D0
. The values inindices
are the indices in the first dimension of the slices that have been extracted from the larger tensor.The dense Tensor,
dense
, represented by TensorIndexedSlices,slices
, has:The TensorIndexedSlices class is used primarily in the definition of gradients for operations that have sparse gradients, such as
gather
.Note that this is different than SparseTensor which uses multi-dimensional indices and scalar values.