pymoose.squeeze#

pymoose.squeeze(x, axis=None, placement=None)[source]#

Reduce out any singleton dimensions of x.

Parameters
  • x – The tensor from which to drop singleton dimensions.

  • axis – Optional index into the shape of x denoting which singleton dimension to drop. If None, drops all singleton dimensions in x.

  • placement – An optional Placement to pin this operation to.

Returns

The squeezed tensor with fewer singleton dimensions.