create_variable

Function Usage

Create a variable tensor.

Prototype

1
create_variable(index: int, name: str) -> TensorHolder

Parameters

Parameter

Input/Output

Description

index

Input

Specifies a variable index.

name

Input

Variable name.

Returns

TensorHolder: tensor holder of a variable.

Constraints

  • Throws TypeError if the parameter type is incorrect.
  • If the variable fails to be created, RuntimeError is thrown.