Using torchinfo changes model's output even though random seed is fixed.
Fanning-Zhang opened this issue · comments
Huilin Zhang commented
As author says, when I using this line summary(model, input_size=(batch_size, 1, 28, 28))
, I can see the architecture of my model clearly in the command line.
However, adding this line changes the outputs of my model even though the random seed is fixed. That makes my project not reproducible and changes models performance.
Does anyone know why?
Please! Need Help!~~~
Tyler Yep commented
Torchinfo runs a forward pass over your model. If you have randomness in your model, this forward pass can cause the random generator to increment