Class InferenceEngine::InputInfo

class InputInfo

This class contains information about each input of the network.

Public Types

using Ptr = std::shared_ptr<InputInfo>

A smart pointer to the InputInfo instance.

using CPtr = std::shared_ptr<const InputInfo>

A smart pointer to the constant InputInfo instance.

Public Functions

inline 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

inline 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

inline 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

inline 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

inline const std::string &name() const

Gets the name of the input.

Returns

A string - the name of the input

inline void setName(const std::string &newName)

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

Parameters

newName – A new name of the input data to set

inline DataPtr getInputData() const

Gets the input data.

Returns

A smart pointer to the input data

inline 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

inline const TensorDesc &getTensorDesc() const

Returns the tensor descriptor.

Returns

A const reference to a tensor descriptor

inline PreProcessInfo &getPreProcess()

Gets pre-process info for the input.

Returns

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

inline 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