You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Multi-step prediction section of chapter 13 (LSTM-FC Seq2Seq Last Hidden, LSTM-FC Seq2Seq All Hidden) I got RuntimeError: Predictions and targets are expected to have the same shape, but got torch.Size([32, 1, 48]) and torch.Size([32, 48, 1]).
src/dl/models.py Line 361, 363 should be fixed to "unsqueeze(-1)" or something. (forward function part of Seq2SeqModel class)
if self.hparams.decoder_type == "FC":
if self.hparams.decoder_use_all_hidden:
y_hat = self.decoder(o.reshape(o.size(0), -1)).unsqueeze(-1) # fixed
else:
y_hat = self.decoder(o[:, -1, :]).unsqueeze(-1) # fixed
The text was updated successfully, but these errors were encountered:
In Multi-step prediction section of chapter 13 (LSTM-FC Seq2Seq Last Hidden, LSTM-FC Seq2Seq All Hidden) I got RuntimeError: Predictions and targets are expected to have the same shape, but got torch.Size([32, 1, 48]) and torch.Size([32, 48, 1]).
src/dl/models.py Line 361, 363 should be fixed to "unsqueeze(-1)" or something. (forward function part of Seq2SeqModel class)
The text was updated successfully, but these errors were encountered: