class ov::preprocess::OutputTensorInfo

Overview

Information about user’s desired output tensor. By default, it will be initialized to same data (type/shape/etc) as model’s output parameter. User application can override particular parameters (like ‘element_type’) according to application’s data and specify appropriate conversions in post-processing steps. More…

#include <output_tensor_info.hpp>

class OutputTensorInfo
{
public:
    // methods

    OutputTensorInfo& set_element_type(const ov::element::Type& type);
    OutputTensorInfo& set_layout(const ov::Layout& layout);
};

Detailed Documentation

Information about user’s desired output tensor. By default, it will be initialized to same data (type/shape/etc) as model’s output parameter. User application can override particular parameters (like ‘element_type’) according to application’s data and specify appropriate conversions in post-processing steps.

auto proc = PrePostProcessor(function);
auto& output = proc.output();
output.postprocess().<add steps + conversion to user's output element type>;
output.tensor().set_element_type(ov::element::u8);
function = proc.build();

Methods

OutputTensorInfo& set_element_type(const ov::element::Type& type)

Set element type for user’s desired output tensor.

Parameters:

type

Element type for user’s output tensor.

Returns:

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

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

Set layout for user’s output tensor.

Parameters:

layout

Layout for user’s output tensor.

Returns:

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