class InferenceEngine::InputInfo

Overview

This class contains information about each input of the network. More…

#include <ie_input_info.hpp>

class InputInfo
{
public:
    // typedefs

    typedef std::shared_ptr<InputInfo> Ptr;
    typedef std::shared_ptr<const InputInfo> CPtr;

    // methods

    Precision getPrecision() const;
    void setPrecision(Precision p);
    Layout getLayout();
    void setLayout(Layout l);
    const std::string& name() const;
    DataPtr getInputData() const;
    void setInputData(DataPtr inputPtr);
    const TensorDesc& getTensorDesc() const;
    PreProcessInfo& getPreProcess();
    const PreProcessInfo& getPreProcess() const;
};

Detailed Documentation

This class contains information about each input of the network.

Typedefs

typedef std::shared_ptr<InputInfo> Ptr

A smart pointer to the InputInfo instance.

typedef std::shared_ptr<const InputInfo> CPtr

A smart pointer to the constant InputInfo instance.

Methods

Precision getPrecision() const

Gets a precision of the input data provided by user.

By default it matches the layers precision, but there are exceptions of this rule For Q78 precision networks the input is expected in I16 by default For FP16 precision networks the input is expected in FP32 by default The default input precision might be changed preferred one using InputInfo::setPrecision() function. For example, for a Q78 precision network you can pass FP32 input data

Returns:

The precision used for input blob creation

void setPrecision(Precision p)

Changes the precision of the input data provided by the user.

This function should be called before loading the network to the plugin

Parameters:

p

A new precision of the input data to set

Layout getLayout()

Gets a layout of the input data provided by user.

By default it matches the layers precision and depends on number of its dimensions: C - for 1-dimensional, NC - for 2-dimensional, CHW - for 3-dimensional, NCHW - for 4-dimensional NCDHW - for 5-dimensional The default input layout might be changed preferred one using setLayout() function.

Returns:

The precision used for input blob creation

void setLayout(Layout l)

Changes the layout of the input data provided by the user.

This function should be called before loading the network to the plugin

Parameters:

l

A new layout of the input data to set

const std::string& name() const

Gets the name of the input.

Returns:

A string - the name of the input

DataPtr getInputData() const

Gets the input data.

Returns:

A smart pointer to the input data

void setInputData(DataPtr inputPtr)

Initializes the pointer to the input data that stores the main input parameters like dims, etc.

This method initializes the precision with the information from the inputPtr if it was not set explicitly through InputInfo::setPrecision. If InputInfo::setPrecision is called, this method does not overwrite the precision.

Parameters:

inputPtr

Pointer to the input data to set

const TensorDesc& getTensorDesc() const

Returns the tensor descriptor.

Returns:

A const reference to a tensor descriptor

PreProcessInfo& getPreProcess()

Gets pre-process info for the input.

Returns:

A reference to the PreProcessInfo instance that contains pre-process info for this input

const PreProcessInfo& getPreProcess() const

Gets pre-process info for the input.

Returns:

A reference to the PreProcessInfo instance that contains pre-process info for this input