my attempts at implementing various bits of Sepp Hochreiter's new xLSTM architecture
MIT License
122
stars
8
forks
source link
y_pred, y_true shape, are different: loss.py:535: UserWarning: Using a target size (torch.Size([1, 1])) that is different to the input size (torch.Size([10, 1])). #4
site-packages/torch/nn/modules/loss.py:535: UserWarning: Using a target size (torch.Size([1, 1])) that is different to the
input size (torch.Size([10, 1])). This will likely lead to incorrect results due to broadcasting. Please ensure they have the same size.
return F.mse_loss(input, target, reduction=self.reduction)
If we set break point, and print out the y_pred, y_true shape, you can see they are different:
> /test/python/mLSTM.py(87)<module>()
-> loss += criterion(y_pred, y_true)
(Pdb) p y_pred.shape
torch.Size([10, 1])
(Pdb) p y_true.shape
torch.Size([1, 1])
(Pdb)
site-packages/torch/nn/modules/loss.py:535: UserWarning: Using a target size (torch.Size([1, 1])) that is different to the input size (torch.Size([10, 1])). This will likely lead to incorrect results due to broadcasting. Please ensure they have the same size.
return F.mse_loss(input, target, reduction=self.reduction)
If we set break point, and print out the y_pred, y_true shape, you can see they are different: