tomgoldstein / loss-landscape

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

[Suggestion] Code change for y range check #43

Open anhtu96 opened 11 months ago

anhtu96 commented 11 months ago

Hi, I'm running the code and in file plot_surface.py there is a check for y range argument. The original code is y_check = assert args.ymin and args.ymax and args.ynum. However, this is not correct when any of the values there equal to 0. I think should add "is not None" to the code, for example

y_check = (args.ymin is not None) and (args.ymax is not None) and (args.ynum is not None)
assert y_check