Hi,
I have a network which outputs NaNs after some epochs.
It looks like this:
self.filter = nn.Sequential(
nn.Conv1D(...),
nn.Sigmoid()
)
The input vector is valid, doesn’t contain any NaNs.
It used to work fine with the following loss function:
distrib = torch.distributions.MultivariateNormal(y, torch.eye(y.size()[0]*sigma)
loss = -distrib.log_prob(x)
but I modified it so that I could compare different models with different sigmas:
distrib = torch.distributions.MultivariateNormal(y, torch.eye(y.size()[0])
loss = -(distrib.log_prob(x)/distrib.log_prob(y))
I use Adam Optimizer, SGD doesn’t work either. What is wrong ?
Thanks.