Home > database >  Every time I train my CNN on matlab, is it remembering the old weights from the previous time I trai
Every time I train my CNN on matlab, is it remembering the old weights from the previous time I trai

Time:05-07

So for example, I have trained a CNN on my data using a learning rate of 0.0003 and 10 epochs, with a minibatch size of 32. After training it, lets say I get an accuracy of 0.7. Now I want to adjust the learning rate and the minibatch size and try training it again to see how the accuracy changes, using the trainNetwork Matlab function. My question is, is it training the model from scratch or is it training them using the weights previously calculated? I want it to start from scratch to prevent overfitting every time I adjust the hyperparamters. Sorry if this is intuitive and I'm being dumb lol I just wanna make sure.

CodePudding user response:

It will start from scratch each time.

MATLAB does support transfer learning which can be useful if you want to fine tune a pretrained model, but you have to program it to do so. Here's an article on transfer learning in MATLAB (I guess so you can make sure you're not doing it!)

https://www.mathworks.com/help/deeplearning/ug/train-deep-learning-network-to-classify-new-images.html

  • Related