Module

SlicingAndJoiningTensors

Methods

# inner splitTensor(tensor, size, axis) → {Tensor}

Splits a tf.Tensor into sub tensors.
Parameters:
Name Type Description
tensor Tensor The input tensor to split.
size Array.<number> | Number 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.
axis Number The dimension along which to split. Defaults to 0 (the first dim).

View Source

tf.split(tensor, size, axis).
Tensor