class DNN::Callbacks::NaNStopping
A callback to stop training the model if loss is NaN by after train on batch.
Public Instance Methods
after_train_on_batch()
click to toggle source
# File lib/dnn/core/callbacks.rb, line 99 def after_train_on_batch throw :stop, "loss is NaN." if model.last_log[:train_loss].nan? end