pymoose.shape#

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

Compute the shape of an input tensor.

Parameters
  • x – A tensor.

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

Returns

A Moose value of type ShapeType corresponding to the input tensor’s shape.