I'm working on training Constitutional Neural Network, and each time I run my model I get different training error rate. Following my previous question Here I found that the main cause is the way in which the weights are generated(randomly) where each time I train my CNN it starts from different point. So, I'm looking for a way that can help me to control the randomness of my weights and keep the same output each time.
One person in my previous question suggested to use the seed. In fact, I tried this code at the beginning of my code, but I'm not quite sure it works correctly.
s = RandStream('mt19937ar','Seed',1);
RandStream.setGlobalStream(s);
I'll be grateful, if you could help me to sort this issue out.
Aucun commentaire:
Enregistrer un commentaire