Validation loss = nan

When I run “evaluate” function on the validation data before I run the “fit” function, the “evaluate” function successfully returns a loss.
When I finally try to run the “fit” function, however, I get “val_loss : nan”.

If I try to run the “fit” function before the “evaluate” function, I still get “val_loss: nan” for the “fit” function. Then when I go back to run the “evaluate” function I get “val_loss: nan” for it too.

Can somebody please help? I’ve tried rerunning the “model = InsuranceModel()” and it doesn’t help.

Turns out, I only get “val_loss: nan” when my learning rate is 0.001 or higher.

Change your loss function to L1 loss.