Public Member Functions | Protected Attributes
InferenceEngine::CNNNetwork Class Reference

This class contains all the information about the Neural Network and the related binary information. More...

#include <ie_cnn_network.h>

Collaboration diagram for InferenceEngine::CNNNetwork:
Collaboration graph
[legend]

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< 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
 Wraps original method ICNNNetwork::getPrecision.
 
virtual OutputsDataMap getOutputsInfo () const
 Wraps original method ICNNNetwork::getOutputsInfo.
 
virtual InputsDataMap getInputsInfo () const
 Wraps original method ICNNNetwork::getInputsInfo.
 
size_t layerCount () const
 Wraps original method ICNNNetwork::layerCount.
 
const std::string & getName () const noexcept
 Wraps original method ICNNNetwork::getName.
 
virtual void setBatchSize (const size_t size)
 Wraps original method ICNNNetwork::setBatchSize.
 
virtual size_t getBatchSize () const
 Wraps original method ICNNNetwork::getBatchSize.
 
 operator ICNNNetwork & () const
 An overloaded operator & to get current network. More...
 
const std::shared_ptr< ngraph::Function > getFunction () const noexcept
 Returns constant nGraph function. More...
 
void addOutput (const std::string &layerName, size_t outputIndex=0)
 Wraps original method ICNNNetwork::addOutput.
 
CNNLayerPtr getLayerByName (const char *layerName) const
 Wraps original method ICNNNetwork::getLayerByName.
 
details::CNNNetworkIterator begin () const
 Begin layer iterator Order of layers is implementation specific, and can be changed in future.
 
details::CNNNetworkIterator end () const
 End layer iterator.
 
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< ICNNNetReaderreader
 reader extra reference, might be nullptr
 
std::shared_ptr< ICNNNetworknetwork
 network extra interface, might be nullptr
 
ICNNNetworkactual = nullptr
 A pointer to the current network.
 
DataPtr output
 A pointer to output data.
 

Detailed Description

This class contains all the information about the Neural Network and the related binary information.

Constructor & Destructor Documentation

§ CNNNetwork() [1/3]

InferenceEngine::CNNNetwork::CNNNetwork ( std::shared_ptr< ICNNNetwork network)
inlineexplicit

Allows helper class to manage lifetime of network object.

Parameters
networkPointer to the network object

§ CNNNetwork() [2/3]

InferenceEngine::CNNNetwork::CNNNetwork ( const std::shared_ptr< ngraph::Function > &  network)
explicit

A constructor from ngraph::Function object.

Parameters
networkPointer to the ngraph::Function object

§ CNNNetwork() [3/3]

InferenceEngine::CNNNetwork::CNNNetwork ( std::shared_ptr< ICNNNetReader reader)
inlineexplicit

A constructor from ICNNNetReader object.

Parameters
readerPointer to the ICNNNetReader object

Member Function Documentation

§ AddExtension()

void InferenceEngine::CNNNetwork::AddExtension ( InferenceEngine::IShapeInferExtensionPtr  extension)
inline

Registers extension within the plugin.

Parameters
extensionPointer to already loaded reader extension with shape propagation implementations

§ getFunction()

const std::shared_ptr<ngraph::Function> InferenceEngine::CNNNetwork::getFunction ( ) const
inlinenoexcept

Returns constant nGraph function.

Returns
constant nGraph function

§ getInputShapes()

virtual ICNNNetwork::InputShapes InferenceEngine::CNNNetwork::getInputShapes ( ) const
inlinevirtual

  • Helper method to get collect all input shapes with names of corresponding Data objects

Returns
Map of pairs: input's name and its dimension.

§ operator ICNNNetwork &()

InferenceEngine::CNNNetwork::operator ICNNNetwork & ( ) const
inline

An overloaded operator & to get current network.

Returns
An instance of the current network

§ reshape()

virtual void InferenceEngine::CNNNetwork::reshape ( const ICNNNetwork::InputShapes inputShapes)
inlinevirtual

Run shape inference with new input shapes for the network.

Parameters
inputShapes- map of pairs: name of corresponding data and its dimension.

§ serialize()

void InferenceEngine::CNNNetwork::serialize ( const std::string &  xmlPath,
const std::string &  binPath = "" 
) const
inline

Serialize network to IR and weights files.

Parameters
xmlPathPath to output IR file.
binPathPath to output weights file. The parameter is skipped in case of executable graph info serialization.

§ size()

size_t InferenceEngine::CNNNetwork::size ( ) const
inline

number of layers in network object

Returns

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