tomgoldstein / loss-landscape

Code for visualizing the loss landscape of neural nets
MIT License
2.72k stars 388 forks source link

Nan values for loss when running both 1D and 2D plotting #25

Closed pkadambi closed 4 years ago

pkadambi commented 4 years ago

Hi, I'm not sure if I'm missing something simple, but using either VGG9 or Resnet56 for both the 1D and 2D visualizations gives nan losses when they should be smaller. Using Pytorch 0.4.1, models downloaded from provided links

image

pkadambi commented 4 years ago

For anyone else who has this issue (very large loss or nan loss), make sure to add the --xnorm filter --xignore biasbn --ynorm filter --yignore biasbn arguments to normalize the directions.

Code also works no problem with pytorch 1.2.0, cuda 10