create_variable

Applicable Products

All processors

Function Usage

Creates a variable tensor.

Prototype

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

Parameters

Parameter

Input/Output

Description

index

Input

Variable index.

name

Input

Variable name.

Returns

(TensorHolder) Tensor holder of the variable

Restrictions

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