Public Types | Public Member Functions
InferenceEngine::CNNNetReader Class Reference

This is a wrapper class used to build and parse a network from the given IR. More...

#include <ie_cnn_net_reader.h>

Public Types

using Ptr = std::shared_ptr< CNNNetReader >
 A smart pointer to this class.
 

Public Member Functions

 CNNNetReader ()
 A default constructor.
 
void ReadNetwork (const std::string &filepath)
 
void ReadNetwork (const void *model, size_t size)
 
void SetWeights (const TBlob< uint8_t >::Ptr &weights)
 
void ReadWeights (const std::string &filepath)
 
CNNNetwork getNetwork ()
 Gets a copy of built network object. More...
 
bool isParseSuccess () const
 
std::string getDescription () const
 
std::string getName () const
 
int getVersion () const
 

Detailed Description

This is a wrapper class used to build and parse a network from the given IR.

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

All the methods here can throw exceptions.

Member Function Documentation

§ getDescription()

std::string InferenceEngine::CNNNetReader::getDescription ( ) const
inline

Retrieves the last building failure message if failed.

Wraps ICNNNetReader::getDescription

Returns
StatusCode that indicates the network status

§ getName()

std::string InferenceEngine::CNNNetReader::getName ( ) const
inline

Gets network name.

Wraps ICNNNetReader::getName

Returns
String

§ getNetwork()

CNNNetwork InferenceEngine::CNNNetReader::getNetwork ( )
inline

Gets a copy of built network object.

Returns
A copy of the CNNNetwork object to be loaded

§ getVersion()

int InferenceEngine::CNNNetReader::getVersion ( ) const
inline

Returns a version of IR.

Wraps ICNNNetReader::getVersion

Returns
IR version number: 1 or 2

§ isParseSuccess()

bool InferenceEngine::CNNNetReader::isParseSuccess ( ) const
inline

Retrieves the last building status.

Wraps ICNNNetReader::isParseSuccess

Returns
true if a parse is successful, false otherwise

§ ReadNetwork() [1/2]

void InferenceEngine::CNNNetReader::ReadNetwork ( const std::string &  filepath)
inline

Parses the topology part of the IR (.xml)

Wraps ICNNNetReader::ReadNetwork

Parameters
filepathThe full path to the .xml file of the IR

§ ReadNetwork() [2/2]

void InferenceEngine::CNNNetReader::ReadNetwork ( const void *  model,
size_t  size 
)
inline

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

Wraps ICNNNetReader::ReadNetwork(const void*, size_t, ResponseDesc*)

Parameters
modelPointer to a char array with the IR
sizeSize of the char array in bytes

§ ReadWeights()

void InferenceEngine::CNNNetReader::ReadWeights ( const std::string &  filepath)
inline

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

Wraps ICNNNetReader::ReadWeights

Parameters
filepathFull path to the .bin file

§ SetWeights()

void InferenceEngine::CNNNetReader::SetWeights ( const TBlob< uint8_t >::Ptr weights)
inline

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

Wraps ICNNNetReader::SetWeights

Parameters
weightsBlob of bytes that holds all the IR binary data

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