|TensorFlow 1 version||View source on GitHub|
A sparse representation of a set of tensor slices at given indices.
This class is a simple wrapper for a pair of
Tensorof any dtype with shape
[D0, D1, ..., Dn].
indices: A 1-D integer
IndexedSlices is typically used to represent a subset of a larger
dense of shape
[LARGE0, D1, .. , DN] where
LARGE0 >> D0.
The values in
indices are the indices in the first dimension of
the slices that have been extracted from the larger tensor.
The dense tensor
dense represented by an
dense[slices.indices[i], :, :, :, ...] = slices.values[i, :, :, :, ...]
IndexedSlices class is used principally in the definition of
gradients for operations that have sparse gradients
Contrast this representation with
which uses multi-dimensional indices and scalar values.
__init__( values, indices, dense_shape=None )
Tensor containing the shape of the corresponding dense tensor.
The name of the device on which
values will be produced, or
DType of elements in this tensor.
Graph that contains the values, indices, and shape tensors.
Tensor containing the indices of the slices.
The name of this
Operation that produces
values as an output.
Tensor containing the values of the slices.