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 : arrayshape 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