Can you please guide utilizing Validation Data along with an image data store?
1 次查看(过去 30 天)
显示 更早的评论
I'm using a data store of 50 k images of Breast Cancer.
I want to verify if my training learning is susceptible to overfitting.
But I don't understand, How to use validation data.
This my script without validation data:
0 个评论
采纳的回答
Amanjit Dulai
2023-6-5
You can specify validation data in the training options with the ValidationData option. Below I've used your test data set, but you probably might want to create a separate validation set from your original data:
opts = trainingOptions("sgdm", ...
"InitialLearnRate", 0.0001, ...
"MaxEpoch", 10, ...
"Plots", "training-progress", ...
"ValidationData", resizeBreastCancerTest);
4 个评论
Amanjit Dulai
2023-6-12
There are a few things you could try.
- The initial learning rate of 0.0001 is quite low. You could try increasing it.
- Alternatively, you could try using the ADAM algorithm for training, which tends to be less sensitive to hyperparameters. You can do this by changing "sgdm" in the call to trainingOptions to "adam".
- You could train for more epochs. 10 epochs is a fairly low number.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Recognition, Object Detection, and Semantic Segmentation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!