You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for the useful project written in pytorch. When looking into the code, I found that some places could be optimized:
Use model.eval() during validation. According to the documentation of pytorch, Dropout behaves differently between 'train' and 'eval' mode. And both models used in cifar10 and mnist have Dropout layers.
Wrapping validation part with with torch.no_grad() may save time and memory.
The text was updated successfully, but these errors were encountered:
Hi, thanks for the useful project written in pytorch. When looking into the code, I found that some places could be optimized:
model.eval()
during validation. According to the documentation of pytorch,Dropout
behaves differently between 'train' and 'eval' mode. And both models used in cifar10 and mnist haveDropout
layers.with torch.no_grad()
may save time and memory.The text was updated successfully, but these errors were encountered: