Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

you're obviously using opencv24, where the global random generator is used to initialize the weights.

so, when you restart your prog, you will always start with the same seed, if you run it in a loop, - not so.

as a remedy, initialize the global seed for each iteration:

theRNG().state = 12345679;

(note, that the opencv30 version does not suffer from this problem)

you're obviously using opencv24, where the global random generator is used to initialize the weights.

so, when you restart your prog, you will always start with the same seed, if you run it in a loop, - not so.

as a remedy, initialize the global seed for each iteration:train run:

theRNG().state = 12345679;

(note, that the opencv30 version does not suffer from this problem)