stop training when too many consecutive NaNs (#515)
stop training when too many consecutive NaNs (#515)

Fixes #511: warn the user when NaNs pop up and automatically stop training after N consecutive NaN training losses
YosefLab/scVI