I am getting different accuracy after each run in DNN.
Show older comments
Hello there
I am using a simple DNN architecture , with 24 layers in total, containing CNN and classification layer only. for 10 epochs I am getting a diffrent accuracy every time is it possible. Also the traing graph is not settled till end of training, I tried for 50 epochs too.
any help?
8 Comments
Walter Roberson
on 25 Jun 2020
I think it likely that there is random initialization going on.
Try using rng() with a fixed seed, such as
rng(655321)
just before each training session, to see whether you get the same result each time.
krishna Chauhan
on 25 Jun 2020
Kanika Gupta
on 25 Jun 2020
Edited: Walter Roberson
on 25 Jun 2020
krishna Chauhan
on 25 Jun 2020
Walter Roberson
on 25 Jun 2020
Can you attach your code and data? You can zip it all up and attach the zip.
krishna Chauhan
on 26 Jun 2020
Edited: krishna Chauhan
on 26 Jun 2020
krishna Chauhan
on 26 Jun 2020
krishna Chauhan
on 27 Jun 2020
Answers (1)
Aditya Patil
on 19 Aug 2020
0 votes
Set a random seed using the rng function. Otherwise, during each run, a different random seed might be selected, resulting in different results.
1 Comment
krishna Chauhan
on 25 Aug 2020
Categories
Find more on Deployment, Integration, and Supported Hardware 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!