create_const_uint32
Function Usage
Creates a uint32 constant tensor.
Prototype
1 | create_const_uint32(value: Union[int, List[int]], shape: Optional[List[int]] = None) -> TensorHolder |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
value |
Input |
A single integer or a list of integers. |
shape |
Input |
(Optional) Shape dimension. |
Returns
TensorHolder: tensor holder of a constant.
Restrictions
- If it is a list and the shape is provided, the number of elements must match the product of the shape dimensions.
- If the value is not an int or int list, a TypeError is thrown.
- If the number of values does not match the shape, ValueError is thrown.
- If the constant fails to be created, RuntimeError is thrown.
Parent topic: GraphBuilder