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 |
NOTE: The function is deprecated. 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... |
|
Batch size of the network.
Provides getter and setter interfaces to get and modify the network batch size. For example:
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 | An .xml file of the IR. Depending on init_from_buffer value, can be a string path or bytes with file content. |
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 True , attributes are interpreted as strings with paths to .xml and .bin files of IR. If False , they are interpreted as Python bytes object with .xml and .bin files content. |
Usage example:
Initializing IENetwork
object from IR files:
Initializing IENetwork
object bytes with content of IR files:
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.
NOTE: Before using this method, make sure that the target shape is applicable for the network. Changing the network shape to an arbitrary value may lead to unpredictable behaviour.
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: