The input tensor to split.
Either an integer indicating the number of
splits along the axis or an array of integers containing the sizes of
each output tensor along the axis. If a number then it must evenly divide
x.shape[axis]
; otherwise the sum of sizes must match x.shape[axis]
.
Can contain one -1 indicating that dimension is to be inferred.
Optional
axis: numberThe dimension along which to split. Defaults to 0 (the first dim).
Generated using TypeDoc
Splits a
tf.Tensor
into sub tensors.If
numOrSizeSplits
is a number, splitsx
along dimensionaxis
intonumOrSizeSplits
smaller tensors. Requires thatnumOrSizeSplits
evenly dividesx.shape[axis]
.If
numOrSizeSplits
is a number array, splitsx
intonumOrSizeSplits.length
pieces. The shape of thei
-th piece has the same size asx
except along dimensionaxis
where the size isnumOrSizeSplits[i]
.