This class contains all the information about the Neural Network and the related binary information. More...
#include <ie_cnn_network.h>
Public Member Functions | |
CNNNetwork () | |
A default constructor. | |
CNNNetwork (std::shared_ptr< ICNNNetwork > network) | |
Allows helper class to manage lifetime of network object. More... | |
CNNNetwork (const std::shared_ptr< ngraph::Function > &network, const std::vector< IExtensionPtr > &exts={}) | |
A constructor from ngraph::Function object This constructor wraps existing ngraph::Function If you want to avoid modification of original Function, please create a copy. More... | |
OutputsDataMap | getOutputsInfo () const |
Gets the network output Data node information. The received info is stored in the given Data node. More... | |
InputsDataMap | getInputsInfo () const |
Gets the network input Data node information. The received info is stored in the given InputsDataMap object. More... | |
size_t | layerCount () const |
Returns the number of layers in the network as an integer value. More... | |
const std::string & | getName () const |
Returns the network name. More... | |
void | setBatchSize (const size_t size) |
Changes the inference batch size. More... | |
size_t | getBatchSize () const |
Gets the inference batch size. More... | |
operator ICNNNetwork::Ptr () | |
An overloaded operator cast to get pointer on current network. More... | |
operator ICNNNetwork & () | |
An overloaded operator & to get current network. More... | |
operator const ICNNNetwork & () const | |
An overloaded operator & to get current network. More... | |
std::shared_ptr< ngraph::Function > | getFunction () |
Returns constant nGraph function. More... | |
std::shared_ptr< const ngraph::Function > | getFunction () const |
Returns constant nGraph function. More... | |
void | addOutput (const std::string &layerName, size_t outputIndex=0) |
Adds output to the layer. More... | |
ICNNNetwork::InputShapes | getInputShapes () const |
Helper method to get collect all input shapes with names of corresponding Data objects. More... | |
void | reshape (const ICNNNetwork::InputShapes &inputShapes) |
Run shape inference with new input shapes for the network. More... | |
void | serialize (const std::string &xmlPath, const std::string &binPath={}) const |
Serialize network to IR and weights files. More... | |
std::string | getOVNameForTensor (const std::string &orig_name) const |
Method maps framework tensor name to OpenVINO name. More... | |
Protected Attributes | |
std::shared_ptr< ICNNNetwork > | network |
Network extra interface, might be nullptr. | |
ICNNNetwork * | actual = nullptr |
A pointer to the current network. | |
DataPtr | output |
A pointer to output data. | |
This class contains all the information about the Neural Network and the related binary information.
|
explicit |
Allows helper class to manage lifetime of network object.
network | Pointer to the network object |
|
explicit |
A constructor from ngraph::Function object This constructor wraps existing ngraph::Function If you want to avoid modification of original Function, please create a copy.
network | Pointer to the ngraph::Function object |
exts | Vector of pointers to IE extension objects |
void InferenceEngine::CNNNetwork::addOutput | ( | const std::string & | layerName, |
size_t | outputIndex = 0 |
||
) |
Adds output to the layer.
Wraps ICNNNetwork::addOutput
layerName | Name of the layer |
outputIndex | Index of the output |
size_t InferenceEngine::CNNNetwork::getBatchSize | ( | ) | const |
Gets the inference batch size.
Wraps ICNNNetwork::getBatchSize
std::shared_ptr<ngraph::Function> InferenceEngine::CNNNetwork::getFunction | ( | ) |
Returns constant nGraph function.
std::shared_ptr<const ngraph::Function> InferenceEngine::CNNNetwork::getFunction | ( | ) | const |
Returns constant nGraph function.
ICNNNetwork::InputShapes InferenceEngine::CNNNetwork::getInputShapes | ( | ) | const |
Helper method to get collect all input shapes with names of corresponding Data objects.
InputsDataMap InferenceEngine::CNNNetwork::getInputsInfo | ( | ) | const |
Gets the network input Data node information. The received info is stored in the given InputsDataMap object.
Wraps ICNNNetwork::getInputsInfo
const std::string& InferenceEngine::CNNNetwork::getName | ( | ) | const |
OutputsDataMap InferenceEngine::CNNNetwork::getOutputsInfo | ( | ) | const |
Gets the network output Data node information. The received info is stored in the given Data node.
Wraps ICNNNetwork::getOutputsInfo
|
inline |
Method maps framework tensor name to OpenVINO name.
orig_name | Framework tensor name |
size_t InferenceEngine::CNNNetwork::layerCount | ( | ) | const |
Returns the number of layers in the network as an integer value.
Wraps ICNNNetwork::layerCount
InferenceEngine::CNNNetwork::operator const ICNNNetwork & | ( | ) | const |
An overloaded operator & to get current network.
InferenceEngine::CNNNetwork::operator ICNNNetwork & | ( | ) |
An overloaded operator & to get current network.
InferenceEngine::CNNNetwork::operator ICNNNetwork::Ptr | ( | ) |
An overloaded operator cast to get pointer on current network.
void InferenceEngine::CNNNetwork::reshape | ( | const ICNNNetwork::InputShapes & | inputShapes | ) |
Run shape inference with new input shapes for the network.
inputShapes | - map of pairs: name of corresponding data and its dimension. |
void InferenceEngine::CNNNetwork::serialize | ( | const std::string & | xmlPath, |
const std::string & | binPath = {} |
||
) | const |
Serialize network to IR and weights files.
xmlPath | Path to output IR file. |
binPath | Path to output weights file. The parameter is skipped in case of executable graph info serialization. |
void InferenceEngine::CNNNetwork::setBatchSize | ( | const size_t | size | ) |
Changes the inference batch size.
Wraps ICNNNetwork::setBatchSize
size | Size of batch to set |