openvino.runtime.opset13.constant(value: int | float | ndarray | number | bool | bool_ | list, dtype: type | dtype | Type = None, name: str | None = None, *, shared_memory: bool = False) Constant#

Create a Constant node from provided value.

  • value – One of: array of values or scalar to initialize node with.

  • dtype – The data type of provided data. If dtype does not match, data will be converted. Note: disables sharing of the memory when convertion occurs.

  • name – Optional name for output node.

  • shared_memory – keyword-only argument. If True, this Constant’s memory is being shared with a host, that means the responsibility of keeping host memory is on the side of a user. Any action performed on the host memory is reflected on this Constant’s memory! If False, data is being copied to this Constant. Requires data to be C_CONTIGUOUS if True. Disabled by default if: - value is a scalar. - dtype is one of: Type.u1, Type.i4, Type.u4, Type.nf4, Type.bf16. - dtype force conversion of data.


The Constant node initialized with provided data.