Welcome to our Support Center

Get all loss type

Description

Gets the information related to the loss of each layer contained in the model.

Input parameters

 

Model in : model architecture.

Output parameters

 

Model out : model architecture.

loss_type_array : array

index : integer, index of layer.
name : string, name of layer.
output_order : integer, output number.
 loss_type : enum, name of the losse used by the layer.
loss_axis : string, the axis on which the losse performs its calculation.

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).

Using the “Get All Loss Type” function

1 – Define Graph

We define two graphs with one input and two dense layers. In the first graph the dense layers are named Dense1 and Dense2. In the second one we named the layers Dense3 and Dense4.

2 – Merge Function

We use the “Merge” function to merge the two graphs.

3 – Set Function

The “Set All Loss Type” function is used to define the loss to be applied to each graph. For the first graph we will apply the “MeanSquare” loss on axis 1 and for the second we will apply the “BinaryCrossentropy” loss on axis 0.

2 – Get Function

We use the function “Get All Loss Type” to get all the loss applied to the model.

Tags:
Table of Contents