https://nl.mathworks.com/help/deeplearning/ref/deep.trainingprogressmonitor.recordmetrics.html
recordMetrics - Record metric values for custom training loops - MATLAB
This MATLAB function records the specified metric value in the training plot and the MetricData property of the TrainingProgressMonitor object monitor.
custom trainingrecordmetricvaluesloops