Class ov::preprocess::OutputModelInfo

class OutputModelInfo

Information about model’s output tensor. If all information is already included to loaded model, this info may not be needed. However it can be set to specify additional information about model’s output, like ‘layout’.

Example of usage of model’s ‘layout’: Suppose model has output result with shape {1, 3, 224, 224} and NHWC layout. User may need to transpose output picture to interleaved format {1, 224, 224, 3}. This can be done with the following code

<model has output result with shape {1, 3, 224, 224}>
auto proc = PrePostProcessor(function);
proc.output().model().set_layout("NCHW");
proc.output().postprocess().convert_layout("NHWC");
function = proc.build();

Public Functions

~OutputModelInfo()

Default destructor.

OutputModelInfo &set_layout(const ov::Layout &layout)

Set layout for model’s output tensor.

Parameters

layoutLayout for model’s output tensor.

Returns

Reference to ‘this’ to allow chaining with other calls in a builder-like manner