Files
openvino/docs/ops/infrastructure/Constant_1.md
2023-04-21 13:30:07 +02:00

1.5 KiB

Constant

@sphinxdirective

Versioned name: Constant-1

Category: Infrastructure

Short description: Constant operation produces a tensor with content read from binary file by offset and size.

Attributes

  • offset

    • Description: specifies position in binary file with weights where the content of the constant begins; value in bytes
    • Range of values: non-negative integer value
    • Type: int
    • Required: yes
  • size

    • Description: size of constant content in binary files; value in bytes
    • Range of values: positive integer bigger than zero
    • Type: int
    • Required: yes
  • element_type

    • Description: the type of element of output tensor
    • Range of values: u1, u8, u16, u32, u64, i8, i16, i32, i64, f16, f32, boolean, bf16
    • Type: string
    • Required: yes
  • shape

    • Description: the shape of the output tensor
    • Range of values: list of non-negative integers, empty list is allowed, which means 0D or scalar tensor
    • Type: int[]
    • Required: yes

Outputs

  • 1: Output tensor of type T.

Types

  • T: any type from element type values.

Example

.. code-block:: cpp

<layer ... type="Constant"> 8 8

@endsphinxdirective