0

when i want to train an EncoderRNN i get this error

Expected hidden size (2, 1, 300), got [1, 1, 300]

my code :

enter image description here

enter image description here

when i set hidden = zeros(2,1,300) i get this error

RuntimeError: For unbatched 2-D input, hx should also be 2-D but got 3-D tensor

what should i do ?

mahdi
  • 13
  • 2
  • 1
    Please read [Why should I not upload images of code/data/errors?](https://meta.stackoverflow.com/q/285551/354577) Instead, format code as a [code block]. The easiest way to do this is to paste the code as text directly into your question, then select it and click the code block button. – ChrisGPT was on strike Apr 23 '23 at 16:26

0 Answers0