Please use. NET 5,. NET 6, NET 7,. NET 8, NET Framework 4.6, NET Framework 4.61, NET Framework 4.7, NET Framework 4.72, NET Framework 4.8, NET Framework 4.81, and. NET Core 3.1 versions

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

Definition

Namespace: OpenVinoSharp
Assembly: OpenVINO_CSharp_API (in OpenVINO_CSharp_API.dll) Version: 2024.3.0.2+a9617c0f8f80882646d0eba11b88ae6cb17b3fb8
C#
public class Layout : IDisposable
Inheritance
Object    Layout
Implements
IDisposable

Example

`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

Constructors

Layout Constructs a Layout with static or dynamic layout information based on string representation.

Properties

Ptr [public]Layout class pointer.

Methods

Dispose Release unmanaged resources.
Finalize Default deconstruction
(Overrides ObjectFinalize)
to_string String representation of Layout.

Fields

m_ptr [private]Layout class pointer.

See Also