Reshape

Input

  • x:
    • Required: yes
    • Type: float16, float32, int8, uint8, int16, uint16, int32, uint32, int64, uint64
    • Description: input tensor
    • Restrictions: none
  • shape:
    • Required: no
    • Type: int32, int64
    • Description: the output dimensions. If some of the dimensions are set to 0, the corresponding dimension from the bottom layer is used (unchanged). If a dimension is set to –1, its value is inferred from the count of the bottom blob and the remaining dimensions.
    • Restrictions: none

Attribute

  • axis:
    • Required: yes
    • Type: int
    • Description: start axis of the bottom blob's shape to be replaced by the reshape (default = 0)
    • Restriction: Must be in the range [–rank(x), rank(x)).
  • num_axes:
    • Required: no
    • Type: int
    • Description: portion of the bottom blob's shape that is included in the reshape.
      • When num_axes == –1: output shape.size() = shape.size() + axis
      • When num_axes<>–1: output shape.size() = shape.size() + tensor.size() – num_axes
    • Restriction: Must be in the range [–1, rank(x)). Defaults to –1 to include all remaining axes starting from axis.

Output

y:
  • Required: yes
  • Type: float16, float32, int8, uint8, int16, uint16, int32, uint32, int64, uint64
  • Description: reshaped output tensor
  • Restrictions: none