Skip to content
fn

squeeze_all_op

→TensorImplPtr
int squeeze_all_op(const int & a)

Remove every size-1 dimension from a tensor.

Equivalent to repeated application of squeeze_op on each size-1 axis. If no such axes exist, returns a view with the same shape.

See Also

squeeze_op.

Parameters

aTensorImplPtr
Input tensor.

Returns

TensorImplPtr

A view with all size-1 dimensions removed. Rank may equal the input's rank if no size-1 axes were present.