This class is the main interface to build and parse a network from a given IR.
More...
#include <ie_icnn_net_reader.h>
This class is the main interface to build and parse a network from a given IR.
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.
§ getDescription()
Retrieves the last building failure message if failed.
- Parameters
-
- Returns
- StatusCode that indicates the network status
§ getName()
Gets network name.
- Parameters
-
name |
Pointer to preallocated buffer that receives network name |
len |
Length of the preallocated buffer, network name will be trimmed by this lenght |
resp |
Response message |
- Returns
- Result code
§ getNetwork()
Returns a pointer to the built network.
- Parameters
-
§ getVersion()
virtual int InferenceEngine::ICNNNetReader::getVersion |
( |
ResponseDesc * |
resp |
) |
|
|
pure virtualnoexcept |
Returns a version of IR.
- Parameters
-
- Returns
- IR version number: 1 or 2
§ isParseSuccess()
virtual bool InferenceEngine::ICNNNetReader::isParseSuccess |
( |
ResponseDesc * |
resp |
) |
|
|
pure virtualnoexcept |
Retrieves the last building status.
- Parameters
-
§ ReadNetwork() [1/2]
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
-
filepath |
The full path to the .xml file of the IR |
resp |
Response 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
-
model |
Pointer to a char array with the IR |
resp |
Response message |
size |
Size of the char array in bytes |
- Returns
- Result code
§ ReadWeights()
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
-
filepath |
Full path to the .bin file |
resp |
Response message |
- Returns
- Result code
§ SetWeights()
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
-
weights |
Blob of bytes that holds all the IR binary data |
resp |
Response message |
- Returns
- Result code
The documentation for this class was generated from the following file: