Are you sure that your data contains no null values?
I added this assert assert not (torch.isnan(name.data).any() or torch.isnan(pct.data).any())
in the forward call of your model and it appears to fire before the loss goes to NaN.
Adding
print(torch.isnan(pct).any())
to your dataset’s __getitem__
method shows that the NaN value is present at data loading time.