regression - Pytorch loss inf nan - Stack Overflow
stackoverflow.com › questions › 51033066Jun 26, 2018 · Pytorch loss inf nan. I'm trying to do simple linear regression with 1 feature. It's a simple 'predict salary given years experience' problem. The NN trains on years experience (X) and a salary (Y). For some reason the loss is exploding and ultimately returns inf or nan. import torch import torch.nn as nn import pandas as pd import numpy as np ...