Functions
Network

Functions

IEStatusCode ie_network_free (ie_network_t **network)
 When netowrk is loaded into the Infernece Engine, it is not required anymore and should be released. More...
 
IEStatusCode ie_network_get_inputs_number (const ie_network_t *network, size_t *size_result)
 Gets number of inputs for the network. More...
 
IEStatusCode ie_network_get_input_name (const ie_network_t *network, size_t number, char **name)
 Gets name corresponding to the "number". Use the ie_network_name_free() method to free memory. More...
 
IEStatusCode ie_network_get_input_precision (const ie_network_t *network, const char *input_name, precision_e *prec_result)
 Gets a precision of the input data provided by user. More...
 
IEStatusCode ie_network_set_input_precision (ie_network_t *network, const char *input_name, const precision_e p)
 Changes the precision of the input data provided by the user. This function should be called before loading the network to the device. More...
 
IEStatusCode ie_network_get_input_layout (const ie_network_t *network, const char *input_name, layout_e *layout_result)
 Gets a layout of the input data. More...
 
IEStatusCode ie_network_set_input_layout (ie_network_t *network, const char *input_name, const layout_e l)
 Changes the layout of the input data named "input_name". This function should be called before loading the network to the device. More...
 
IEStatusCode ie_network_get_input_dims (const ie_network_t *network, const char *input_name, dimensions_t *dims_result)
 
IEStatusCode ie_network_get_input_resize_algorithm (const ie_network_t *network, const char *input_name, resize_alg_e *resize_alg_result)
 Gets pre-configured resize algorithm. More...
 
IEStatusCode ie_network_set_input_resize_algorithm (ie_network_t *network, const char *input_name, const resize_alg_e resize_algo)
 Sets resize algorithm to be used during pre-processing. More...
 
IEStatusCode ie_network_get_color_format (const ie_network_t *network, const char *input_name, colorformat_e *colformat_result)
 Gets color format of the input data. More...
 
IEStatusCode ie_network_set_color_format (ie_network_t *network, const char *input_name, const colorformat_e color_format)
 Changes the color format of the input data. More...
 
IEStatusCode ie_network_get_input_shapes (ie_network_t *network, input_shapes_t *shapes)
 Helper method collect all input shapes with input names of corresponding input data. Use the ie_network_input_shapes_free() method to free memory. More...
 
IEStatusCode ie_network_reshape (ie_network_t *network, const input_shapes_t shapes)
 Run shape inference with new input shapes for the network. More...
 
IEStatusCode ie_network_get_outputs_number (const ie_network_t *network, size_t *size_result)
 Gets number of output for the network. More...
 
IEStatusCode ie_network_get_output_name (const ie_network_t *network, const size_t number, char **name)
 Gets name corresponding to the "number". Use the ie_network_name_free() method to free memory. More...
 
IEStatusCode ie_network_get_output_precision (const ie_network_t *network, const char *output_name, precision_e *prec_result)
 Gets a precision of the output data named "output_name". More...
 
IEStatusCode ie_network_set_output_precision (ie_network_t *network, const char *output_name, const precision_e p)
 Changes the precision of the output data named "output_name". More...
 
IEStatusCode ie_network_get_output_layout (const ie_network_t *network, const char *output_name, layout_e *layout_result)
 Gets a layout of the output data. More...
 
IEStatusCode ie_network_set_output_layout (ie_network_t *network, const char *output_name, const layout_e l)
 Changes the layout of the output data named "output_name". More...
 
IEStatusCode ie_network_get_output_dims (const ie_network_t *network, const char *output_name, dimensions_t *dims_result)
 Gets dimensions/shape of the output data with reversed order. More...
 
IEStatusCode ie_network_input_shapes_free (input_shapes_t *inputShapes)
 Releases memory occupied by input_shapes. More...
 
IEStatusCode ie_network_name_free (char **name)
 Releases momory occupied by input_name or output_name. More...
 

Detailed Description

Set of functions managing network been read from the IR before loading of it to the device.

Function Documentation

§ ie_network_free()

IEStatusCode ie_network_free ( ie_network_t **  network)

When netowrk is loaded into the Infernece Engine, it is not required anymore and should be released.

Parameters
networkThe pointer to the instance of the ie_network_t to free.
Returns
Status code of the operation: OK(0) for success.

§ ie_network_get_color_format()

IEStatusCode ie_network_get_color_format ( const ie_network_t *  network,
const char *  input_name,
colorformat_e colformat_result 
)

Gets color format of the input data.

Parameters
networkA pointer to ie_network_t instance.
input_nameName of input data.
colformat_resultThe pointer to the color format used for input blob creation. Status code of the operation: OK(0) for success.

§ ie_network_get_input_dims()

IEStatusCode ie_network_get_input_dims ( const ie_network_t *  network,
const char *  input_name,
dimensions_t dims_result 
)

dimensions/shape of the input data with reversed order.

Parameters
networkA pointer to ie_network_t instance.
input_nameName of input data.
dims_resultA pointer to the dimensions used for input blob creation.
Returns
Status code of the operation: OK(0) for success.

§ ie_network_get_input_layout()

IEStatusCode ie_network_get_input_layout ( const ie_network_t *  network,
const char *  input_name,
layout_e layout_result 
)

Gets a layout of the input data.

Parameters
networkA pointer to ie_network_t instance.
input_nameName of input data.
layout_resultA pointer to the layout used for input blob creation.
Returns
Status code of the operation: OK(0) for success.

§ ie_network_get_input_name()

IEStatusCode ie_network_get_input_name ( const ie_network_t *  network,
size_t  number,
char **  name 
)

Gets name corresponding to the "number". Use the ie_network_name_free() method to free memory.

Parameters
networkA pointer to theinstance of the ie_network_t to get input information.
numberAn id of input information .
nameInput name corresponding to the number.
Returns
status Status code of the operation: OK(0) for success.

§ ie_network_get_input_precision()

IEStatusCode ie_network_get_input_precision ( const ie_network_t *  network,
const char *  input_name,
precision_e prec_result 
)

Gets a precision of the input data provided by user.

Parameters
networkA pointer to ie_network_t instance.
input_nameName of input data.
prec_resultA pointer to the precision used for input blob creation.
Returns
Status code of the operation: OK(0) for success.

§ ie_network_get_input_resize_algorithm()

IEStatusCode ie_network_get_input_resize_algorithm ( const ie_network_t *  network,
const char *  input_name,
resize_alg_e resize_alg_result 
)

Gets pre-configured resize algorithm.

Parameters
networkA pointer to ie_network_t instance.
input_nameName of input data. resize_alg_result The pointer to the resize algorithm used for input blob creation.
Returns
Status code of the operation: OK(0) for success.

§ ie_network_get_input_shapes()

IEStatusCode ie_network_get_input_shapes ( ie_network_t *  network,
input_shapes_t shapes 
)

Helper method collect all input shapes with input names of corresponding input data. Use the ie_network_input_shapes_free() method to free memory.

Parameters
networkA pointer to the instance of the ie_network_t to get input shapes.
shapesA pointer to the input_shapes.
Returns
Status code of the operation: OK(0) for success.

§ ie_network_get_inputs_number()

IEStatusCode ie_network_get_inputs_number ( const ie_network_t *  network,
size_t *  size_result 
)

Gets number of inputs for the network.

Parameters
networkA pointer to the instance of the ie_network_t to get number of input information.
size_resultA number of the instance's input information.
Returns
Status code of the operation: OK(0) for success.

§ ie_network_get_output_dims()

IEStatusCode ie_network_get_output_dims ( const ie_network_t *  network,
const char *  output_name,
dimensions_t dims_result 
)

Gets dimensions/shape of the output data with reversed order.

Parameters
networkA pointer to ie_network_t instance.
output_nameName of output data.
dims_resultA pointer to the dimensions used for output blob creation.
Returns
Status code of the operation: OK(0) for success.

§ ie_network_get_output_layout()

IEStatusCode ie_network_get_output_layout ( const ie_network_t *  network,
const char *  output_name,
layout_e layout_result 
)

Gets a layout of the output data.

Parameters
networkA pointer to ie_network_t instance.
output_nameName of output data.
layout_resultA pointer to the layout used for output blob creation.
Returns
Status code of the operation: OK(0) for success.

§ ie_network_get_output_name()

IEStatusCode ie_network_get_output_name ( const ie_network_t *  network,
const size_t  number,
char **  name 
)

Gets name corresponding to the "number". Use the ie_network_name_free() method to free memory.

Parameters
networkA pointer to theinstance of the ie_network_t to get output information.
numberAn id of output information .
nameOutput name corresponding to the number.
Returns
Status code of the operation: OK(0) for success.

§ ie_network_get_output_precision()

IEStatusCode ie_network_get_output_precision ( const ie_network_t *  network,
const char *  output_name,
precision_e prec_result 
)

Gets a precision of the output data named "output_name".

Parameters
networkA pointer to ie_network_t instance.
output_nameName of output data.
prec_resultA pointer to the precision used for output blob creation.
Returns
Status code of the operation: OK(0) for success.

§ ie_network_get_outputs_number()

IEStatusCode ie_network_get_outputs_number ( const ie_network_t *  network,
size_t *  size_result 
)

Gets number of output for the network.

Parameters
networkA pointer to the instance of the ie_network_t to get number of ouput information.
size_resultA number of the network's output information.
Returns
Status code of the operation: OK(0) for success.

§ ie_network_input_shapes_free()

IEStatusCode ie_network_input_shapes_free ( input_shapes_t inputShapes)

Releases memory occupied by input_shapes.

Parameters
inputShapesA pointer to the input_shapes to free memory.
Returns
Status code of the operation: OK(0) for success.

§ ie_network_name_free()

IEStatusCode ie_network_name_free ( char **  name)

Releases momory occupied by input_name or output_name.

Parameters
nameA pointer to the input_name or output_name to free memory.
Returns
Status code of the operation: OK(0) for success.

§ ie_network_reshape()

IEStatusCode ie_network_reshape ( ie_network_t *  network,
const input_shapes_t  shapes 
)

Run shape inference with new input shapes for the network.

Parameters
networkA pointer to the instance of the ie_network_t to reshape.
shapesA new input shapes to set for the network.
Returns
Status code of the operation: OK(0) for success.

§ ie_network_set_color_format()

IEStatusCode ie_network_set_color_format ( ie_network_t *  network,
const char *  input_name,
const colorformat_e  color_format 
)

Changes the color format of the input data.

Parameters
networkA pointer to ie_network_t instance.
input_nameName of input data.
color_formatColor format of the input data. Status code of the operation: OK(0) for success.

§ ie_network_set_input_layout()

IEStatusCode ie_network_set_input_layout ( ie_network_t *  network,
const char *  input_name,
const layout_e  l 
)

Changes the layout of the input data named "input_name". This function should be called before loading the network to the device.

Parameters
networkA pointer to ie_network_t instance.
input_nameName of input data.
lA new layout of the input data to set.
Returns
Status code of the operation: OK(0) for success.

§ ie_network_set_input_precision()

IEStatusCode ie_network_set_input_precision ( ie_network_t *  network,
const char *  input_name,
const precision_e  p 
)

Changes the precision of the input data provided by the user. This function should be called before loading the network to the device.

Parameters
networkA pointer to ie_network_t instance.
input_nameName of input data.
pA new precision of the input data to set (eg. precision_e.FP16).
Returns
Status code of the operation: OK(0) for success.

§ ie_network_set_input_resize_algorithm()

IEStatusCode ie_network_set_input_resize_algorithm ( ie_network_t *  network,
const char *  input_name,
const resize_alg_e  resize_algo 
)

Sets resize algorithm to be used during pre-processing.

Parameters
networkA pointer to ie_network_t instance.
input_nameName of input data.
resize_algoResize algorithm.
Returns
Status code of the operation: OK(0) for success.

§ ie_network_set_output_layout()

IEStatusCode ie_network_set_output_layout ( ie_network_t *  network,
const char *  output_name,
const layout_e  l 
)

Changes the layout of the output data named "output_name".

Parameters
networkA pointer to ie_network_t instance.
output_nameName of output data.
lA new layout of the output data to set.
Returns
Status code of the operation: OK(0) for success.

§ ie_network_set_output_precision()

IEStatusCode ie_network_set_output_precision ( ie_network_t *  network,
const char *  output_name,
const precision_e  p 
)

Changes the precision of the output data named "output_name".

Parameters
networkA pointer to ie_network_t instance.
output_nameName of output data.
pA new precision of the output data to set (eg. precision_e.FP16).
Returns
Status code of the operation: OK(0) for success.