ptrblck:

Setting the seed before initializing the parameters will make sure to use the same pseudo-random values the next time you are executing the script.


I want to initialize the weights for every layer (irrespective of the initialization method) using a constant seed value. How exactly it’s done in Pytorch?