Load Pytorch weights and see what seed it was trained on

Is it possible to load PyTorch weights into a nn.Module then see what seed was used for initialization?

No, that wouldn’t be possible, if you don’t store the seed and also provide a script to sample exactly these values in a predefined environment.
I also assume that you are loading random values, which were indeed sampled from a specific distribution, since usually you would load pretrained models, which have (as the name suggests) trained parameters.
As mentioned before, even if someone provides the seed you would need to make sure to use the same setup, since different hardware might use different pseudorandom number generators.

1 Like