This is the main interface to describe the NN topology. More...
#include <ie_icnn_network.hpp>
Public Types | |
using | Ptr = std::shared_ptr< ICNNNetwork > |
A shared pointer to a ICNNNetwork interface. | |
using | InputShapes = std::map< std::string, SizeVector > |
Map of pairs: name of corresponding data and its dimension. | |
Public Member Functions | |
virtual std::shared_ptr< ngraph::Function > | getFunction () noexcept=0 |
Returns nGraph function. More... | |
virtual std::shared_ptr< const ngraph::Function > | getFunction () const noexcept=0 |
Returns constant nGraph function. More... | |
virtual Precision | getPrecision () const noexcept=0 |
Returns the main network operating precision. More... | |
virtual void | getOutputsInfo (OutputsDataMap &out) const noexcept=0 |
Gets the network output Data node information. The received info is stored in the given Data node. More... | |
virtual void | getInputsInfo (InputsDataMap &inputs) const noexcept=0 |
Gets the network input Data node information. The received info is stored in the given InputsDataMap object. More... | |
virtual InputInfo::Ptr | getInput (const std::string &inputName) const noexcept=0 |
Returns information on certain input pointed by inputName. More... | |
virtual void | getName (char *pName, size_t len) const noexcept=0 |
Gets the network name. The name is stored in the given pName string. More... | |
virtual const std::string & | getName () const noexcept=0 |
Returns the network name. More... | |
virtual size_t | layerCount () const noexcept=0 |
Returns the number of layers in the network as an integer value. More... | |
virtual DataPtr & | getData (const char *dname) noexcept=0 |
Returns a smart pointer reference to a Data node given its name. More... | |
virtual void | addLayer (const CNNLayerPtr &layer) noexcept=0 |
Insert a layer into the network. A user is responsible to connect it to other data elements. More... | |
virtual StatusCode | addOutput (const std::string &layerName, size_t outputIndex=0, ResponseDesc *resp=nullptr) noexcept=0 |
Adds output to the layer. More... | |
virtual StatusCode | getLayerByName (const char *layerName, CNNLayerPtr &out, ResponseDesc *resp) const noexcept=0 |
Gets network layer with the given name. More... | |
virtual StatusCode | setBatchSize (size_t size, ResponseDesc *responseDesc) noexcept=0 |
Changes the inference batch size. More... | |
virtual size_t | getBatchSize () const noexcept=0 |
Gets the inference batch size. More... | |
virtual StatusCode | reshape (const InputShapes &inputShapes, ResponseDesc *resp) noexcept |
Run shape inference with new input shapes for the network. More... | |
virtual StatusCode | AddExtension (const IShapeInferExtensionPtr &extension, ResponseDesc *resp) noexcept |
Registers extension within the plugin. More... | |
virtual StatusCode | getStats (ICNNNetworkStats **stats, ResponseDesc *resp) const noexcept |
Gets the statistics. More... | |
virtual StatusCode | serialize (const std::string &xmlPath, const std::string &binPath, ResponseDesc *resp) const noexcept=0 |
Serialize network to IR and weights files. More... | |
virtual | ~ICNNNetwork () |
A virtual destructor. | |
This is the main interface to describe the NN topology.
|
virtualnoexcept |
Registers extension within the plugin.
extension | Pointer to already loaded reader extension with shape propagation implementations |
resp | Pointer to the response message that holds a description of an error if any occurred |
|
pure virtualnoexcept |
Insert a layer into the network. A user is responsible to connect it to other data elements.
layer | Const reference to a layer smart pointer |
|
pure virtualnoexcept |
Adds output to the layer.
layerName | Name of the layer |
outputIndex | Index of the output |
resp | Response message |
|
pure virtualnoexcept |
Gets the inference batch size.
|
pure virtualnoexcept |
Returns a smart pointer reference to a Data node given its name.
If the Data node is missing, returns reference to a default initialized new empty data pointer with given name.
dname | Name of the Data node |
|
pure virtualnoexcept |
Returns nGraph function.
|
pure virtualnoexcept |
Returns constant nGraph function.
|
pure virtualnoexcept |
Returns information on certain input pointed by inputName.
inputName | Name of input layer to get info on |
|
pure virtualnoexcept |
Gets the network input Data node information. The received info is stored in the given InputsDataMap object.
For single and multiple inputs networks. This method need to be called to find out input names for using them later when calling InferenceEngine::InferRequest::SetBlob
inputs | Reference to InputsDataMap object. |
|
pure virtualnoexcept |
Gets network layer with the given name.
layerName | Given name of the layer |
out | Pointer to the found CNNLayer object with the given name |
resp | Pointer to the response message that holds a description of an error if any occurred |
|
pure virtualnoexcept |
Gets the network name. The name is stored in the given pName string.
pName | - will receive actual network name, specified in IR file, pName should point to valid memory address before invoking this function |
len | - size in bytes of pName buffer, actual name is trimmed by this size |
|
pure virtualnoexcept |
Returns the network name.
|
pure virtualnoexcept |
Gets the network output Data node information. The received info is stored in the given Data node.
For single and multiple outputs networks.
This method need to be called to find output names for using them later when calling InferenceEngine::InferRequest::GetBlob or InferenceEngine::InferRequest::SetBlob
out | Reference to the OutputsDataMap object |
|
pure virtualnoexcept |
Returns the main network operating precision.
This may be MIXED if not homogeneous.
|
inlinevirtualnoexcept |
Gets the statistics.
stats | The statistics |
resp | Pointer to the response message that holds a description of an error if any occurred |
|
pure virtualnoexcept |
Returns the number of layers in the network as an integer value.
|
inlinevirtualnoexcept |
Run shape inference with new input shapes for the network.
inputShapes | - map of pairs: name of corresponding data and its dimension. |
resp | Pointer to the response message that holds a description of an error if any occurred |
|
pure virtualnoexcept |
Serialize network to IR and weights files.
xmlPath | Path to output IR file. |
binPath | Path to output weights file. |
resp | Pointer to the response message that holds a description of an error if any occurred |
|
pure virtualnoexcept |
Changes the inference batch size.
size | Size of batch to set |
responseDesc | Pointer to the response message that holds a description of an error if any occurred |