In the code:
Q: Convert the numpy arrays
targets_array into PyTorch tensors. Make sure that the data type is
inputs = torch.tensor(inputs_array, dtype=torch.float32)
targets = torch.tensor(targets_array, dtype=torch.float32)
Make sure you have the “dtype=torch.float32”. If you do not have it the data will be float64, I thought that was ok, however, it only works for me when transforming the data to float32.
@lui-geraldino Thanks man … It works!
i think u change your loss function to
F.l1_loss(out,targets) in InsuranceModel class
Thanks for suggesting. I shall try it out
yes Hopefully it works
I guess your val_loader has a problem.