can you help me to solve this ?
Show older comments
can you help me, i use ann for classification of blood type.
Then i used nntool in matlab with my data, i get the result like this

but why every time I run the program again, i get different results?

can you help me ?
Answers (1)
Walter Roberson
on 17 Jun 2020
0 votes
This is expected. Those kinds of neural networks initialize the weights randomly by default.
You have three choices:
- Leave it the way it is now that you know that it is intended design;
- Use rng() to initialize the same random number seed before each run;
- Or initialize the weights yourself
7 Comments
Yudawan Hidayat
on 17 Jun 2020
Edited: Yudawan Hidayat
on 17 Jun 2020
Walter Roberson
on 17 Jun 2020
For the second choice, at the top of the code add
rng(655321)
Yudawan Hidayat
on 18 Jun 2020
Walter Roberson
on 18 Jun 2020
Can you attach your input values for testing?
Yudawan Hidayat
on 19 Jun 2020
Yudawan Hidayat
on 19 Jun 2020
Walter Roberson
on 20 Jul 2020
(Reminder to myself)
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!