Learn three approaches to training a deep learning neural network:
1. training from scratch
2. transfer learning
3. semantic segmentation
This submission, along with the corresponding ebook, offers a hands-on approach to deep learning.
Johanna Pingel (2021). Code Examples from Deep Learning Ebook (https://www.mathworks.com/matlabcentral/fileexchange/67074-code-examples-from-deep-learning-ebook), MATLAB Central File Exchange. Retrieved .
Johanna - I have Nvidia Quadro P620 version 443.32
The different example you pointed out does not work
Davide - Which GPU do you have? A few options:
Check your drivers that they are the most up to date.
Change the mini batch size (though the example already has it set low at 4).
Try a different example and see if the error is the same or different: https://www.mathworks.com/help/deeplearning/ug/semantic-segmentation-using-deep-learning.html
With R2020a when running Demo3 Semantic Segmentation I got this error:
Error using trainNetwork (line 170)
Out of memory.
Error in DeepLearning_For_SemanticSegmentation_code (line 362)
[net, info] = trainNetwork(datasource,lgraph,options);
Out of memory.
This does not make sense I have a new machine with 32Gb of SRAMs.
@Davide - in the file validatePerformance.m Remove lines 7 & 12-14. I'm hoping this clears the error.
In general, this file is to display simple accuracy and a few other metrics after the network is trained. There are other examples of this in documentation which are a better option, in my opinion!
With R2020a when running Demo2 Transfer Learning I get this error:
Not enough input arguments.
Error in validatePerformance (line 7)
Error in TransferLearningDemo (line 291)
accuracy_bayesopt = validatePerformance(net,testDS) %#ok display
Could you please fix it?
just ctrl+f found Johanna's comment
Great one to start with on it..
Thanks a lot!
Got it, I downloaded individual files before. Thanks a lot!
@Adam - the MNISTModel is a .mat file included in the download of the files. It should be under Demo1_MNIST/MNISTModel.mat
Hey, where can I find MNISTModel file (line 22)?
@Venkat - you can remove those lines of code, and the function should run properly without them. This was an old artifact that can be removed. Let me know if you have any trouble.
@Fajar: You are going to run into errors using this code in 2014a. The error is most likely because the function webread() was not introduced until 2014b. You can download the files manually using the link rather than using webread, but you will run into other challenges with the version 2014a, since our deep learning support came out in R2017a
Thank you for sharing the code for these examples. In the function prepareData.m, a couple of lines have been commented out. These are:
% img = readMNISTImage(imgDataTrain, 3);
% figure, imshow(img);
I wasn't able to locate the function readMNISTImage readily. Am I missing anything obvious? Very grateful if you could pint me in the right direction.
i have this error.
Preparing MNIST data...
Error using fread
Invalid file identifier. Use fopen to generate a valid file identifier.
Error in prepareData (line 42)
magicNum = fread(fid, 1, 'uint32');
Error in MNIST_Classification_Demo (line 11)
[imgDataTrain, labelsTrain, imgDataTest, labelsTest] = prepareData;
i use R2014a
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!