Closed dmankins closed 4 years ago
This means that, unless you specify a seed, all runs of train_unet_neurodata.py will end up using the same sequence of results from the PRNGs
This is actually the intended behavior. The reason for this is that a fixed deterministic seed
Using a randomly chosen seed makes it impossible to cleanly compare training runs because randomness can have a significant influence on trainings (speaking from personal experience).
Using 0 as the default seed was an arbitrary choice.
If you want to deliberately test how randomness influences a training, the idea is to set the --seed
option to different values manually in different runs.
Is there an advantage of letting the random seed be nondeterministic by default?
If that is the intention, then there is no problem.
Perhaps a comment in the help-string for the --seed option ("if you want randomness, choose a different seed for each run") would be appropriate. In my experience, an option for specifying a specific seed is used to allow for reproducibility, and the default is a random seed (which I assume is why random.seed and np.random.seed use None for their defaults).
(Feel free to close this issue.)
train_unet_neurodata.py has a default of 0 for the --seed option --- meaning, use 0 for the random seed. A seed of 0 is not a seed of None --- it's just like using any other fixed integral seed. This means that, unless you specify a seed, all runs of train_unet_neurodata.py will end up using the same sequence of results from the PRNGs.
Since there is no provision for getting different runs out of the program, I assume this is not what is intended.
One might consider using -1 as the default value for the --seed option, and then using None as a seed if args.seed is -1: