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 ()=default | |
A default constructor. | |
CNNNetwork (std::shared_ptr< ICNNNetwork > network) | |
Allows helper class to manage lifetime of network object. More... | |
CNNNetwork (const std::shared_ptr< const ngraph::Function > &network) | |
A constructor from ngraph::Function object. More... | |
CNNNetwork (std::shared_ptr< ICNNNetReader > reader) | |
A constructor from ICNNNetReader object. More... | |
virtual | ~CNNNetwork () |
A destructor. | |
virtual Precision | getPrecision () const |
virtual OutputsDataMap | getOutputsInfo () const |
virtual InputsDataMap | getInputsInfo () const |
size_t | layerCount () const |
const std::string & | getName () const noexcept |
virtual void | setBatchSize (const size_t size) |
virtual size_t | getBatchSize () const |
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< const ngraph::Function > | getFunction () const noexcept |
Returns constant nGraph function. More... | |
void | addOutput (const std::string &layerName, size_t outputIndex=0) |
CNNLayerPtr | getLayerByName (const char *layerName) const |
details::CNNNetworkIterator | begin () const |
Begin layer iterator. More... | |
details::CNNNetworkIterator | end () const |
End layer iterator. More... | |
size_t | size () const |
Number of layers in network object. More... | |
void | AddExtension (InferenceEngine::IShapeInferExtensionPtr extension) |
Registers extension within the plugin. More... | |
virtual ICNNNetwork::InputShapes | getInputShapes () const |
Helper method to get collect all input shapes with names of corresponding Data objects. More... | |
virtual 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... | |
Protected Attributes | |
std::shared_ptr< ICNNNetReader > | reader |
Reader extra reference, might be nullptr. | |
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.
|
inlineexplicit |
Allows helper class to manage lifetime of network object.
network | Pointer to the network object |
|
explicit |
A constructor from ngraph::Function object.
network | Pointer to the ngraph::Function object |
|
inlineexplicit |
A constructor from ICNNNetReader object.
reader | Pointer to the ICNNNetReader object |
void InferenceEngine::CNNNetwork::AddExtension | ( | InferenceEngine::IShapeInferExtensionPtr | extension | ) |
Registers extension within the plugin.
extension | Pointer to already loaded reader extension with shape propagation implementations |
|
inline |
Adds output to the layer.
Wraps ICNNNetwork::addOutput
layerName | Name of the layer |
outputIndex | Index of the output |
details::CNNNetworkIterator InferenceEngine::CNNNetwork::begin | ( | ) | const |
Begin layer iterator.
Order of layers is implementation specific, and can be changed in future
details::CNNNetworkIterator InferenceEngine::CNNNetwork::end | ( | ) | const |
End layer iterator.
|
inlinevirtual |
Gets the inference batch size.
Wraps ICNNNetwork::getBatchSize
|
inlinenoexcept |
Returns constant nGraph function.
|
inlinevirtual |
Helper method to get collect all input shapes with names of corresponding Data objects.
|
inlinevirtual |
Gets the network input Data node information. The received info is stored in the given InputsDataMap object.
Wraps ICNNNetwork::getInputsInfo
CNNLayerPtr InferenceEngine::CNNNetwork::getLayerByName | ( | const char * | layerName | ) | const |
Wraps ICNNNetwork::getLayerByName
layerName | Given name of the layer |
|
inlinenoexcept |
Gets the network name. The name is stored in the given pName string.
Wraps ICNNNetwork::getName
|
inlinevirtual |
Gets the network output Data node information. The received info is stored in the given Data node.
Wraps ICNNNetwork::getOutputsInfo
|
virtual |
Wraps ICNNNetwork::getPrecision
|
inline |
Returns the number of layers in the network as an integer value.
Wraps ICNNNetwork::layerCount
|
inline |
An overloaded operator & to get current network.
|
inline |
An overloaded operator & to get current network.
|
inlinevirtual |
Run shape inference with new input shapes for the network.
inputShapes | - map of pairs: name of corresponding data and its dimension. |
|
inline |
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. |
|
inlinevirtual |
Changes the inference batch size.
Wraps ICNNNetwork::setBatchSize
size | Size of batch to set |
size_t InferenceEngine::CNNNetwork::size | ( | ) | const |
Number of layers in network object.