How to get the same output for the same test example provided to the neural network as explained below?
3 views (last 30 days)
Show older comments
Hi everyone,
I'm building a property-rental prediction model using 2-layer BackPropagation neural network. Everything went well. But the net produces different output every time I apply it to the same test example. I'd like to know how can I get consistent results when applying the network on the same test data (using sim function)? I know that it has something to do with the network weights being randomly initialized. However, there must be a way to either initialize the weights to some values or maybe to use another strategy.
Thank you!
Iulia
0 Comments
Accepted Answer
Greg Heath
on 28 Jul 2013
Intialize the random number generator to a specified state before the weights are initialized. For example, rng(0) or rng(1492)
Hope this helps.
Thank you for formally accepting my answer
Greg
P.S. Search rng(0) greg
More Answers (0)
See Also
Categories
Find more on Deep Learning Toolbox 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!