How to change plotting options in deep learning networks?

1 visualización (últimos 30 días)
Fatma Diab
Fatma Diab el 11 de Nov. de 2021
Respondida: Jaynik el 28 de Jun. de 2024
I have trained a deep learning network, and the training progress graph appeared from trainNetwork function. This curve shows training accuracy, smoothed training accuracy, and validation accuracy. I need to remove smoothed training accuracy curve from the graph. Could you please help me? https://ch.mathworks.com/help/deeplearning/ref/trainingoptions.html?fbclid=IwAR0zK3F4pzPV_DqbAkRk_Ou7CmN3viJMXVx-ovnEmLfvc_M8dNWw3vZvMPs

Respuestas (1)

Jaynik
Jaynik el 28 de Jun. de 2024
Hi,
There is no direct way to remove the smoothed training accuracy curve from the graph. If possible, you can upgrade MATLAB and use the "trainnet" function introduced in R2023a. The plots don't provide the smoothed accuracy. Since R2024a, the "trainNetwork" function is not recommended.
Alternately, if it is possible to use custom loops for training the data, you can use the "trainingProgressMonitor" object. It allows for creating animated custom metric plots and record custom metrics during training. Following is an example of using "trainingProgressMonitor":
monitor = trainingProgressMonitor;
addMetrics(monitor, ["TrainingAccuracy", "ValidationAccuracy"]);
% Training loop example
for epoch = 1:numEpochs
% Perform training and validation steps here
% Update custom metrics
recordMetrics(monitor, epoch, ["TrainingAccuracy", trainingAccuracy, "ValidationAccuracy", validationAccuracy]);
end
% Display the training progress monitor
show(monitor);
You can refer the following documentation links to learn about these functions:
Hope this helps!

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by