set_shape

Function Usage

Sets the tensor shape.

Prototype

1
set_shape(shape: List[int]) -> TensorHolder

Parameters

Parameter

Input/Output

Description

shape

Input

Shape dimension list.

Returns

(TensorHolder) Returns itself to support chain calls.

Constraints

  • If the shape is not an integer list, TypeError is thrown.
  • Throws TypeError if all shape dimensions are not integers.
  • If the operation fails, RuntimeError is thrown.