Public Member Functions | Friends
InferenceEngine::ExecutableNetwork Class Reference

This is an interface of an executable network. More...

#include <ie_executable_network.hpp>

Public Member Functions

 ExecutableNetwork ()=default
 A default constructor.
 
 ExecutableNetwork (std::shared_ptr< IExecutableNetwork > exec, std::shared_ptr< details::SharedObjectLoader > splg={})
 Constructs ExecutableNetwork from the initialized std::shared_ptr. More...
 
ConstOutputsDataMap GetOutputsInfo () const
 Gets the Executable network output Data node information. More...
 
ConstInputsDataMap GetInputsInfo () const
 Gets the executable network input Data node information. More...
 
InferRequest CreateInferRequest ()
 Creates an inference request object used to infer the network. More...
 
void Export (const std::string &modelFileName)
 Exports the current executable network. More...
 
void Export (std::ostream &networkModel)
 Exports the current executable network. More...
 
CNNNetwork GetExecGraphInfo ()
 Get executable graph information from a device. More...
 
void SetConfig (const std::map< std::string, Parameter > &config)
 Sets configuration for current executable network. More...
 
Parameter GetConfig (const std::string &name) const
 Gets configuration for current executable network. More...
 
Parameter GetMetric (const std::string &name) const
 Gets general runtime metric for an executable network. More...
 
RemoteContext::Ptr GetContext () const
 Returns pointer to plugin-specific shared context on remote accelerator device that was used to create this ExecutableNetwork. More...
 
bool operator! () const noexcept
 Checks if current ExecutableNetwork object is not initialized. More...
 
 operator bool () const noexcept
 Checks if current ExecutableNetwork object is initialized. More...
 
void reset (std::shared_ptr< IExecutableNetwork > newActual)
 reset owned object to new pointer. More...
 
 operator std::shared_ptr< IExecutableNetwork > ()
 cast operator is used when this wrapper initialized by LoadNetwork More...
 
InferRequest::Ptr CreateInferRequestPtr ()
 Creates an inference request object used to infer the network. More...
 
std::vector< VariableStateQueryState ()
 Gets state control interface for given executable network. More...
 

Friends

class Core
 

Detailed Description

This is an interface of an executable network.

Constructor & Destructor Documentation

◆ ExecutableNetwork()

InferenceEngine::ExecutableNetwork::ExecutableNetwork ( std::shared_ptr< IExecutableNetwork exec,
std::shared_ptr< details::SharedObjectLoader >  splg = {} 
)
explicit

Constructs ExecutableNetwork from the initialized std::shared_ptr.

Deprecated:
This ctor will be removed in 2022.1
Parameters
execInitialized shared pointer
splgPlugin to use. This is required to ensure that ExecutableNetwork can work properly even if plugin object is destroyed.

Member Function Documentation

◆ CreateInferRequest()

InferRequest InferenceEngine::ExecutableNetwork::CreateInferRequest ( )

Creates an inference request object used to infer the network.

The created request has allocated input and output blobs (that can be changed later).

Returns
InferRequest object

◆ CreateInferRequestPtr()

InferRequest::Ptr InferenceEngine::ExecutableNetwork::CreateInferRequestPtr ( )

Creates an inference request object used to infer the network.

Deprecated:
Use ExecutableNetwork::CreateInferRequest

Wraps IExecutableNetwork::CreateInferRequest.

Returns
shared pointer on InferenceEngine::InferRequest object

◆ Export() [1/2]

void InferenceEngine::ExecutableNetwork::Export ( const std::string &  modelFileName)

Exports the current executable network.

See also
Core::ImportNetwork
Parameters
modelFileNameFull path to the location of the exported file

◆ Export() [2/2]

void InferenceEngine::ExecutableNetwork::Export ( std::ostream &  networkModel)

Exports the current executable network.

See also
Core::ImportNetwork
Parameters
networkModelNetwork model output stream

◆ GetConfig()

Parameter InferenceEngine::ExecutableNetwork::GetConfig ( const std::string &  name) const

Gets configuration for current executable network.

The method is responsible to extract information which affects executable network execution. The list of supported configuration values can be extracted via ExecutableNetwork::GetMetric with the SUPPORTED_CONFIG_KEYS key, but some of these keys cannot be changed dynamically, e.g. DEVICE_ID cannot changed if an executable network has already been compiled for particular device.

Parameters
nameconfig key, can be found in ie_plugin_config.hpp
Returns
Configuration parameter value

◆ GetContext()

RemoteContext::Ptr InferenceEngine::ExecutableNetwork::GetContext ( ) const

Returns pointer to plugin-specific shared context on remote accelerator device that was used to create this ExecutableNetwork.

Returns
A context

◆ GetExecGraphInfo()

CNNNetwork InferenceEngine::ExecutableNetwork::GetExecGraphInfo ( )

Get executable graph information from a device.

Wraps IExecutableNetwork::GetExecGraphInfo.

Returns
CNNetwork containing Executable Graph Info

◆ GetInputsInfo()

ConstInputsDataMap InferenceEngine::ExecutableNetwork::GetInputsInfo ( ) const

Gets the executable network input Data node information.

The received info is stored in the given InferenceEngine::ConstInputsDataMap object. This method need to be called to find out input names for using them later when calling InferenceEngine::InferRequest::SetBlob

Parameters
inputsReference to InferenceEngine::ConstInputsDataMap object.
Returns
A collection that contains string as key, and const InputInfo smart pointer as value

◆ GetMetric()

Parameter InferenceEngine::ExecutableNetwork::GetMetric ( const std::string &  name) const

Gets general runtime metric for an executable network.

It can be network name, actual device ID on which executable network is running or all other properties which cannot be changed dynamically.

Parameters
namemetric name to request
Returns
Metric parameter value

◆ GetOutputsInfo()

ConstOutputsDataMap InferenceEngine::ExecutableNetwork::GetOutputsInfo ( ) const

Gets the Executable network output Data node information.

The received info is stored in the given InferenceEngine::ConstOutputsDataMap node. This method need to be called to find output names for using them later when calling InferenceEngine::InferRequest::GetBlob or InferenceEngine::InferRequest::SetBlob

Returns
A collection that contains string as key, and const Data smart pointer as value

◆ operator bool()

InferenceEngine::ExecutableNetwork::operator bool ( ) const
explicitnoexcept

Checks if current ExecutableNetwork object is initialized.

Returns
true if current ExecutableNetwork object is initialized, false - otherwise

◆ operator std::shared_ptr< IExecutableNetwork >()

InferenceEngine::ExecutableNetwork::operator std::shared_ptr< IExecutableNetwork > ( )

cast operator is used when this wrapper initialized by LoadNetwork

Deprecated:
Will be removed. Use operator bool
Returns
A shared pointer to IExecutableNetwork interface.

◆ operator!()

bool InferenceEngine::ExecutableNetwork::operator! ( ) const
noexcept

Checks if current ExecutableNetwork object is not initialized.

Returns
true if current ExecutableNetwork object is not initialized, false - otherwise

◆ QueryState()

std::vector<VariableState> InferenceEngine::ExecutableNetwork::QueryState ( )

Gets state control interface for given executable network.

Deprecated:
Use InferRequest::QueryState instead

State control essential for recurrent networks

Returns
A vector of Memory State objects

◆ reset()

void InferenceEngine::ExecutableNetwork::reset ( std::shared_ptr< IExecutableNetwork newActual)

reset owned object to new pointer.

Deprecated:
The method Will be removed

Essential for cases when simultaneously loaded networks not expected.

Parameters
newActualactual pointed object

◆ SetConfig()

void InferenceEngine::ExecutableNetwork::SetConfig ( const std::map< std::string, Parameter > &  config)

Sets configuration for current executable network.

Parameters
configMap of pairs: (config parameter name, config parameter value)

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