tensor.split_to_sequence
fn split_to_sequence(
self: @Tensor<T>, axis: usize, keepdims: usize, split: Option<Tensor<usize>>
) -> Array<Tensor<T>>;Split a tensor into a sequence of tensors, along the specified ‘axis’
Args
self(@Tensor<T>) - The input tensor to split.axis(usize) - The axis along which to split on.keepdims(usize) - Keep the split dimension or not. If input ‘split’ is specified, this attribute is ignored.split(Option<Tensor<usize>>) - Length of each output. It can be either a scalar(tensor of empty shape), or a 1-D tensor. All values must be >= 0.
Panics
Panics if the 'axis' accepted range is not [-rank, rank-1] where r = rank(input).
Panics if the 'split' is not either a scalar (tensor of empty shape), or a 1-D tensor.
Returns
One or more outputs forming a sequence of tensors after splitting.
Examples
Last updated
Was this helpful?