The input tf.Tensor
to slice from.
The coordinates to start the slice from. The length can be less than the rank of x - the rest of the axes will have implicit 0 as start. Can also be a single number, in which case it specifies the first axis.
Optional
size: number | number[]The size of the slice. The length can be less than the rank of x - the rest of the axes will have implicit -1. A value of -1 requests the rest of the dimensions in the axis. Can also be a single number, in which case it specifies the size of the first axis.
Extracts a slice from a
tf.Tensor
starting at coordinatesbegin
and is of sizesize
.Also available are stricter rank-specific methods with the same signature as this method that assert that
x
is of the given rank:tf.slice1d
tf.slice2d
tf.slice3d
tf.slice4d