Layout Class
ov::Layout represents the text information of tensor's dimensions/axes. E.g. layout `NCHW` means that 4D
tensor `{-1, 3, 480, 640}` will have:
- 0: `N = -1`: batch dimension is dynamic
- 1: `C = 3`: number of channels is '3'
- 2: `H = 480`: image height is 480
- 3: `W = 640`: image width is 640
Namespace: OpenVinoSharpAssembly: OpenVINO_CSharp_API (in OpenVINO_CSharp_API.dll) Version: 2024.3.0.2+a9617c0f8f80882646d0eba11b88ae6cb17b3fb8
public class Layout : IDisposable
- Inheritance
- Object Layout
- Implements
- IDisposable
`ov::Layout` can be specified for:
- Preprocessing purposes. E.g.
- To apply normalization (means/scales) it is usually required to set 'C' dimension in a layout.
- To resize the image to specified width/height it is needed to set 'H' and 'W' dimensions in a layout
- To transpose image - source and target layout can be set (see
`ov::preprocess::PreProcessSteps::convert_layout`)
- To set/get model's batch (see `ov::get_batch`/`ov::set_batch') it is required in general to specify 'N' dimension
in layout for appropriate inputs
Layout
|
Constructs a Layout with static or dynamic layout information based on string representation.
|
Ptr
|
[public]Layout class pointer.
|
m_ptr
|
[private]Layout class pointer.
|