Public Member Functions
ie_api.IEPlugin Class Reference

This class is the main plugin interface and serves to initialize and configure the plugin. More...

Public Member Functions

def __init__ (self, device, plugin_dirs=None)
 Class constructor. More...

 
def load (self, IENetwork, network, int, num_requests=1, config=None)
 Loads a network that was read from the IR to the plugin and creates an executable network from a network object. More...

 
def set_initial_affinity (self, IENetwork, net)
 Sets initial affinity for model layers according to the HETERO plugin logic. More...

 
def get_supported_layers (self, IENetwork, net)
 
 
 
def add_cpu_extension (self, str, extension_path)
 Loads extensions library to the plugin. More...

 

Class Attributes

device
A name of the device that was specified to initialize IEPlugin.
version
A version of the plugin.

Detailed Description

This class is the main plugin interface and serves to initialize and configure the plugin.

Constructor & Destructor Documentation

§ __init__()

def ie_api.IEPlugin.__init__ (   self,
  device,
  plugin_dirs = None 
)

Class constructor.

Parameters
deviceTarget device name. Supported devices: CPU, GPU, FPGA, MYRIAD, HETERO, MULTI
plugin_dirsList of paths to plugin directories
Returns
IEPlugin instance

Member Function Documentation

§ add_cpu_extension()

def ie_api.IEPlugin.add_cpu_extension (   self,
  str,
  extension_path,
  except 
)

Loads extensions library to the plugin.

Applicable only for a CPU device and a HETERO device with CPU

Parameters
extension_pathA full path to CPU extensions library
Returns
None

§ load()

def ie_api.IEPlugin.load (   self,
  IENetwork,
  network,
  int,
  num_requests = 1,
  config = None 
)

Loads a network that was read from the IR to the plugin and creates an executable network from a network object.

You can create as many networks as you need and use them simultaneously (up to the limitation of the hardware resources).

Parameters
networkA valid IENetwork instance
num_requestsA positive integer value of infer requests to be created. Number of infer requests may be limited by device capabilities.
configA dictionary of plugin configuration keys and their values
Returns
Valid instance of ExecutableNetwork class

Usage example:

net = IENetwork(model=path_to_xml_file, weights=path_to_bin_file)
plugin = IEPlugin(device="CPU")
exec_net = plugin.load(network=net, num_requsts=2)

§ set_initial_affinity()

def ie_api.IEPlugin.set_initial_affinity (   self,
  IENetwork,
  net,
  except 
)

Sets initial affinity for model layers according to the HETERO plugin logic.

Applicable only if IEPlugin was initialized for a HETERO device.

Parameters
netA valid instance of IENetwork
Returns
None

Usage example: See affinity attribute of the IENetLayer class.