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 (ICNNNetwork *actual)
  Initialises helper class from externally managed pointer. More...
 
  CNNNetwork (std::shared_ptr< ICNNNetwork > network)
  Allows helper class to manage lifetime of network 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.
 
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...
 
void  setTargetDevice (TargetDevice device)
  Sets tha target device. 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< 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.
 

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 ( ICNNNetwork actual )
inlineexplicit

Initialises helper class from externally managed pointer.

Deprecated:
use shared_pointers based version of CNNNetworks constructor
Parameters
actual Pointer to the network object

§ CNNNetwork() [2/3]

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

Allows helper class to manage lifetime of network object.

Parameters
network Pointer to the network object

§ CNNNetwork() [3/3]

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

A constructor from ICNNNetReader object.

Parameters
reader Pointer to the ICNNNetReader object

Member Function Documentation

§ AddExtension()

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

Registers extension within the plugin.

Parameters
extension Pointer to already loaded reader extension with shape propagation implementations

§ 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
xmlPath Path to output IR file.
binPath Path to output weights file.

§ setTargetDevice()

void InferenceEngine::CNNNetwork::setTargetDevice ( TargetDevice  device )
inline

Sets tha target device.

Parameters
device Device instance to set

§ 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: