This class contains the information about the network model read from IR and allows you to manipulate with some model parameters such as layers affinity and output layers. More...
Public Member Functions | |
def | __init__ |
Class constructor. More... | |
def | from_ir |
def | add_outputs (self, outputs) |
Marks any intermediate layer as output layer to retrieve the inference results from the specified layers. More... | |
def | serialize (self, path_to_xml, path_to_bin="") |
Serializes the network and stores it in files. More... | |
def | reshape (self, input_shapes) |
Reshapes the network to change spatial dimensions, batch size, or any dimension. More... | |
A dictionary that maps input layer names to DataPtr objects.
Batch size of the network.
Provides getter and setter interfaces to get and modify the network batch size. For example:
Precision of the network
Returns LayersStatsMap
object containing dictionary that maps network layer names to calibration statistics represented by LayerStats
objects.
Usage example:
This class contains the information about the network model read from IR and allows you to manipulate with some model parameters such as layers affinity and output layers.
def ie_api.IENetwork.__init__ | ( | self, | |
model | |||
) |
Class constructor.
model | A .xml file of the IR or PyCapsule containing smart pointer to nGraph function. In case of passing a .xml file attribute value can be a string path or bytes with file content depending on init_from_buffer attribute value |
weights | A .bin file of the IR. Depending on init_from_buffer value, can be a string path or bytes with file content. |
init_from_buffer | Defines the way of how model and weights attributes are interpreted. If False , attributes are interpreted as strings with paths to .xml and .bin files of IR. If True , they are interpreted as Python bytes object with .xml and .bin files content. Ignored in case of IENetwork object initialization from nGraph function. |
Usage example:
Initializing IENetwork
object from IR files:
Initializing IENetwork
object bytes with content of IR files:
def ie_api.IENetwork.add_outputs | ( | self, | |
outputs | |||
) |
Marks any intermediate layer as output layer to retrieve the inference results from the specified layers.
outputs | List of layers to be set as model outputs. The list can contain strings with layer names to be set as outputs or tuples with layer name as first element and output port id as second element. In case of setting one layer as output, string or tuple with one layer can be provided. |
Usage example:
def ie_api.IENetwork.from_ir | ( | cls, | |
model, | |||
weights | |||
) |
def ie_api.IENetwork.reshape | ( | self, | |
input_shapes | |||
) |
Reshapes the network to change spatial dimensions, batch size, or any dimension.
input_shapes | A dictionary that maps input layer names to tuples with the target shape |
Usage example:
def ie_api.IENetwork.serialize | ( | self, | |
path_to_xml, | |||
path_to_bin = "" |
|||
) |
Serializes the network and stores it in files.
path_to_xml | Path to a file, where a serialized model will be stored |
path_to_bin | Path to a file, where serialized weights will be stored |
Usage example: