tensor.squeeze
Removes dimensions of size 1 from the shape of a tensor.
Args
self
(@Tensor<T>
) - Tensor of data to calculate non-zero indices.axes
(Option<Span<i32>>
) - List of integers indicating the dimensions to squeeze.
Returns
A new Tensor<T>
Reshaped tensor with same data as input.
Example
Last updated