early-stopping-pytorch
early-stopping-pytorch copied to clipboard
Check for nan validation loss
If gradients are exploding, the loss function can return nan, which is interpreted as a decrease in the validation loss. An additional if statement should be added with an np.isnan(score) or similar