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:
layout – Layout for model’s output tensor.
- Returns:
Reference to ‘this’ to allow chaining with other calls in a builder-like manner
-
OutputModelInfo &set_color_format(const ov::preprocess::ColorFormat &format, const std::vector<std::string> &sub_names = {})#
Set color format for model’s output tensor.
- Parameters:
format – Color format for model’s output tensor.
sub_names – Optional list of sub-names, not used, placeholder for future.
- Returns:
Reference to ‘this’ to allow chaining with other calls in a builder-like manner
-
~OutputModelInfo()#