Welcome to our Support Center

Forward GPU

Description

Execute the forward pass of the model (alls layers).

Input parameters

 

Model in : model architecture.
free input? : bool, decides whether to release the input pointer.
train mode : enum

    • Nothing :Β do nothing.
    • Training :Β Do calculation to prepare future loss and backward function. This mode allow the future use of loss and backward function. Caution : if you use this mode with GPUΒ you must connect loss and backward to free memory and avoid memory leak.
    • Predict :Β Do optimized prediction whithout loss and backward preparation. Does not allow to use loss and backward (error 5009). If you want to get metric loss, use metric function after forward.

 

Input Data : cluster

Β device :Β integer,Β number of the device on which the tensor is allocated.
Β ptr :Β unsinged,Β pointer to allocated device memory.
Β datashape :Β array,Β shape of the data.
Β type :Β enum,Β type of the data.

Output parameters

 

Model out : model architecture.

Β outputs_data :Β array

Β name :Β string,Β name of layer.
Β index :Β integer,Β index of layer.
Β dimension :Β enum,Β dimension of the prediction.

      • 2D Prediction
      • 3D Prediction
      • 4D Prediction
      • 5D Prediction
      • 6D Prediction

Β shape :Β array,Β shape of layer.

Β model_informations :Β cluster

Β Model Name :Β string,Β name of model.
Β Execution Time :Β integer,Β execution time of the backward.
Β Device :Β enum,Β device where the process is executed.

      • Native LabVIEW
      • GPU

 

Example

All these exemples are snippets PNG, you can drop these Snippet onto the block diagram and get the depicted code added to your VI (Do not forget to install HAIBAL library to run it).

Table of Contents