I'am training for multiple object detection in images on MATLAB2024b version on a single GPU
3 views (last 30 days)
Show older comments
Evangeline
on 26 Mar 2025
Edited: Shantanu Dixit
on 28 Mar 2025
For the training options, i used MiniBatch of 8 and epoch count of 3, i know its lowest but its a computer with entry level GPU, and i want to know the status of my results, below is the code:
% Define training options
options = trainingOptions('sgdm', ...
'MiniBatchSize', 8, ...
'InitialLearnRate', 1e-4, ...
'MaxEpochs', 3, ...
'Verbose', true, ...
'Shuffle', 'every-epoch', ...
'ExecutionEnvironment', 'gpu', ...
'Plots', 'training-progress');
Attached are the training graph, and minibatch accuracy values along with loss, i feel it became an overfitting model, should i stop training or wait?
0 Comments
Accepted Answer
Shantanu Dixit
on 28 Mar 2025
Edited: Shantanu Dixit
on 28 Mar 2025
Hi Evangeline,
If I understood your query correctly, you are concerned about potential overfitting in your model. Since your training accuracy reaches 100% and loss varies around 1e-3 range within just 3 epochs, it suggests possible overfitting. However, without validation data it's hard to conclusively say about overfitting or not. You can check validation accuracy and loss https://in.mathworks.com/help/deeplearning/ref/trainingoptions.html#d126e253140 — ((from trainingOptions) if validation loss increases while training loss decreases, overfitting is likely. You can also try data augmentation, adding regularization or increasing the batch size (if the GPU allows).
You can refer to the following documentation by MathWorks on data augmentation and regularization:
image data augmenter: https://in.mathworks.com/help/deeplearning/ref/imagedataaugmenter.html
augmentation using Image Processing Toolbox: https://in.mathworks.com/help/deeplearning/ug/image-augmentation-using-image-processing-toolbox.html?requestedDomain=
regularization: https://in.mathworks.com/help/deeplearning/ref/trainingoptions.html#mw_77b727c4-ce09-441d-a02d-7002a209c677
Hope this helps!
0 Comments
More Answers (0)
See Also
Categories
Find more on Image Data Workflows in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!