Public Member Functions
InferenceEngine::ICNNNetReader Class Referenceabstract

This class is the main interface to build and parse a network from a given IR. More...

#include <ie_icnn_net_reader.h>

Inheritance diagram for InferenceEngine::ICNNNetReader:
Inheritance graph
[legend]
Collaboration diagram for InferenceEngine::ICNNNetReader:
Collaboration graph
[legend]

Public Member Functions

virtual StatusCode ReadNetwork (const char *filepath, ResponseDesc *resp) noexcept=0
 Parses the topology part of the IR (.xml) More...
 
virtual StatusCode ReadNetwork (const void *model, size_t size, ResponseDesc *resp) noexcept=0
 Parses the topology part of the IR (.xml) given the xml as a buffer. More...
 
virtual StatusCode SetWeights (const TBlob< uint8_t >::Ptr &weights, ResponseDesc *resp) noexcept=0
 Sets the weights buffer (.bin part) from the IR. More...
 
virtual StatusCode ReadWeights (const char *filepath, ResponseDesc *resp) noexcept=0
 Loads and sets the weights buffer directly from the IR .bin file. More...
 
virtual ICNNNetworkgetNetwork (ResponseDesc *resp) noexcept=0
 Returns a pointer to the built network. More...
 
virtual bool isParseSuccess (ResponseDesc *resp) noexcept=0
 Retrieves the last building status. More...
 
virtual StatusCode getDescription (ResponseDesc *resp) noexcept=0
 Retrieves the last building failure message if failed. More...
 
virtual StatusCode getName (char *name, size_t len, ResponseDesc *resp) noexcept=0
 Gets network name. More...
 
virtual int getVersion (ResponseDesc *resp) noexcept=0
 Returns a version of IR. More...
 
virtual void addExtensions (const std::vector< InferenceEngine::IExtensionPtr > &ext)=0
 
 ~ICNNNetReader () override=default
 A virtual destructor.
 

Detailed Description

This class is the main interface to build and parse a network from a given IR.

Deprecated:
Use InferenceEngine::Core::ReadNetwork methods. This API will be removed in 2021.1

All methods here do not throw exceptions and return a StatusCode and ResponseDesc object. Alternatively, to use methods that throw exceptions, refer to the CNNNetReader wrapper class.

Member Function Documentation

§ getDescription()

virtual StatusCode InferenceEngine::ICNNNetReader::getDescription ( ResponseDesc resp)
pure virtualnoexcept

Retrieves the last building failure message if failed.

Parameters
respResponse message
Returns
StatusCode that indicates the network status

§ getName()

virtual StatusCode InferenceEngine::ICNNNetReader::getName ( char *  name,
size_t  len,
ResponseDesc resp 
)
pure virtualnoexcept

Gets network name.

Parameters
namePointer to preallocated buffer that receives network name
lenLength of the preallocated buffer, network name will be trimmed by this lenght
respResponse message
Returns
Result code

§ getNetwork()

virtual ICNNNetwork* InferenceEngine::ICNNNetReader::getNetwork ( ResponseDesc resp)
pure virtualnoexcept

Returns a pointer to the built network.

Parameters
respResponse message
Returns
A pointer to a network

§ getVersion()

virtual int InferenceEngine::ICNNNetReader::getVersion ( ResponseDesc resp)
pure virtualnoexcept

Returns a version of IR.

Parameters
respResponse message
Returns
IR version number: 1 or 2

§ isParseSuccess()

virtual bool InferenceEngine::ICNNNetReader::isParseSuccess ( ResponseDesc resp)
pure virtualnoexcept

Retrieves the last building status.

Parameters
respResponse message
Returns
True in case of parsing is successful, false otherwise.

§ ReadNetwork() [1/2]

virtual StatusCode InferenceEngine::ICNNNetReader::ReadNetwork ( const char *  filepath,
ResponseDesc resp 
)
pure virtualnoexcept

Parses the topology part of the IR (.xml)

This method can be called once only to read network. If you need to read another network instance then create new reader instance.

Parameters
filepathThe full path to the .xml file of the IR
respResponse message
Returns
Result code

§ ReadNetwork() [2/2]

virtual StatusCode InferenceEngine::ICNNNetReader::ReadNetwork ( const void *  model,
size_t  size,
ResponseDesc resp 
)
pure virtualnoexcept

Parses the topology part of the IR (.xml) given the xml as a buffer.

This method can be called once only to read network. If you need to read another network instance then create new reader instance.

Parameters
modelPointer to a char array with the IR
respResponse message
sizeSize of the char array in bytes
Returns
Result code

§ ReadWeights()

virtual StatusCode InferenceEngine::ICNNNetReader::ReadWeights ( const char *  filepath,
ResponseDesc resp 
)
pure virtualnoexcept

Loads and sets the weights buffer directly from the IR .bin file.

This method can be called more than once to reflect updates in the .bin.

Parameters
filepathFull path to the .bin file
respResponse message
Returns
Result code

§ SetWeights()

virtual StatusCode InferenceEngine::ICNNNetReader::SetWeights ( const TBlob< uint8_t >::Ptr &  weights,
ResponseDesc resp 
)
pure virtualnoexcept

Sets the weights buffer (.bin part) from the IR.

Weights Blob must always be of bytes - the casting to precision is done per-layer to support mixed networks and to ease of use. This method can be called more than once to reflect updates in the .bin.

Parameters
weightsBlob of bytes that holds all the IR binary data
respResponse message
Returns
Result code

The documentation for this class was generated from the following file: