TylerYep / torchinfo

View model summaries in PyTorch!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using torchinfo changes model's output even though random seed is fixed.

Fanning-Zhang opened this issue · comments

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!~~~

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