How to plot performance graph after CNN training
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am new in deep learning and unable to plot performance graph after training my CNN architecture . My code is as follows :-
opts = trainingOptions('sgdm',
'Momentum', 0.9,
'InitialLearnRate', 0.001,
'LearnRateSchedule', 'piecewise',
'LearnRateDropFactor', 0.1,
'LearnRateDropPeriod', 8,
'L2Regularization', 0.004,
'MaxEpochs', 40,
'MiniBatchSize', 128,
'Verbose', true);
cifar10Net = trainNetwork(trainingImages, trainingLabels, layers, opts);
YTest = classify(cifar10Net, testImages);
accuracy = sum(YTest == testLabels)/numel(testLabels)
0 commentaires
Réponses (1)
Parag
le 7 Mar 2025
Hi, the current code does not include instructions to plot the performance graph (training progress, accuracy, loss, etc.). However, MATLAB automatically displays the training progress plot by default when using the "trainingOptions" function with the "Plots" property set to "training-progress."
Modify the “trainingOptions” to include the “Plots” parameter:
Please refer to MATLAB code for the same
opts = trainingOptions('sgdm', ...
'Momentum', 0.9, ...
'InitialLearnRate', 0.001, ...
'LearnRateSchedule', 'piecewise', ...
'LearnRateDropFactor', 0.1, ...
'LearnRateDropPeriod', 8, ...
'L2Regularization', 0.004, ...
'MaxEpochs', 40, ...
'MiniBatchSize', 128, ...
'Verbose', true, ...
'Plots', 'training-progress'); % Enable performance graph
This will display a real-time training progress plot, including accuracy, loss, and learning rate changes during training.
0 commentaires
Voir également
Catégories
En savoir plus sur Recognition, Object Detection, and Semantic Segmentation dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!