create_variable
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
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.
Parent topic: GraphBuilder