ExecuteNeuralNetwork (MO)

Execute a neural network using the provided image as input and provide the output of the specified output layers. The function doesn't perform any pre-processing or transformation.
Can use available TwinCAT Job Tasks for executing parallel code regions.

Syntax

Definition:

HRESULT ExecuteNeuralNetwork(
    HRESULT             hrPrev,
    ITcVnNeuralNetwork* ipNeuralNetwork,
    ITcVnImage*         ipSrcImage,
    ITcVnContainer*&    ipDestImages,
    ITcVnContainer*     ipOutputNames
)

Parameters

Name

Type

Description

hrPrev

HRESULT

HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.)

ipNeuralNetwork

ITcVnNeuralNetwork*

Neural network model

ipSrcImage

ITcVnImage*

Source image (The image layout must be adapted to match the model's expected input format using e.g. F_VN_ConvertDataLayout or F_VN_ReshapeImage functions if necessary.)

ipDestImages

ITcVnContainer*&

Container of images containing the output from the specified layers.

ipOutputNames

ITcVnContainer*

Container of layer names whose outputs to be returned (ContainerType_Vector_String_SINT). If set to zero, the outputs of all unconnected output layers will be returned..

 Return value

HRESULT

Required License

TC3 Neural Network Realtime Inference

System Requirements