# Validation Loss

The use of training set is in common for all tools, but High Detail tools has another data set called "validation set" or "validation data" which is part of the training set, whose amount of data is chosen by users. For High Detail tools, the validation loss (=the loss calculated from the validation data) is calculated for each model during the training phase, and the model who gives the best validation loss in terms of performance and availability is finally selected as the result of training. You can monitor the change of the validation loss in training for each High Detail mode with the Loss Inspector.

The purpose of validation data is among many neural network models generated from the training data choosing the best model as the final output of training. The training strategy that adopts validation data to achieve this goal is here called "training with validation." Unlike Focused tools, High Detail tools provide the training with validation, and you can control the network training with monitoring validation loss. During training at the end of every 1/8 epoch, the neural network calculates the loss value from the validation set you previously configured.

The validation loss stands for the performance of your trained network in terms of accuracy of classification (Green Classify High Detail) or segmentation (Red Analyze High Detail), which means that smaller loss generally means a better network. So it is better to have this value close to 0. The validation loss of Red Analyze High Detail is calculated per pixel as the segmentation, which is the binary classification among "Good" or "Defect", is executed on each pixel. The validation loss of Green High Detail is calculated per view as the classification is executed on each view. Though, to gain the full-sight regarding how your network truly performs well, you have to test the trained network against some separate data (Test Data) to prevent overfitting.

- For Red Analyze High Detail, the following factors are considered:

  - Validation Loss (from 0 through 1):1 - IOU

  - IOU (unit: %)

    IOU is the intersection over union that measures to what extent predicted areas are equal to their ground truth. The formula to calculate IOU is:

    (Ground Truth Area ∩ Predicted Area) / (Ground Truth Area ∪ Predicted Area)

- For Green Classify High Detail, the following factors are considered:

  - Validation Loss (from 0 through 1): 1 - The average value of the classification precisions of each class