Package org.intel.openvino
Class Layout
- java.lang.Object
-
- org.intel.openvino.Wrapper
-
- org.intel.openvino.Layout
-
public class Layout extends Wrapper
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
- 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
Model.get_batch()/'set_batch') it is required in general to specify 'N' dimension
-
-
Constructor Summary
Constructors Constructor Description Layout(java.lang.String str)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddelete(long nativeObj)static intheight_idx(Layout layout)Returns 'height' dimension index.static intwidth_idx(Layout layout)Returns 'width' dimension index.-
Methods inherited from class org.intel.openvino.Wrapper
finalize, getNativeObjAddr
-
-