'EncoderRNN' object is not callable
Closed this issue · 2 comments
Serbernari commented
TRADE.py line 135 - you trying to call an object. Must be you mean not
encoded_outputs, encoded_hidden = self.encoder(story.transpose(0, 1), data['context_len'])
but
encoded_outputs, encoded_hidden = self.encoder.forward(story.transpose(0, 1), data['context_len'])
?
I wonder how this error exists in all versions of file TRADE.py and how it's even worked at all
jasonwu0731 commented
Did you try to run the code or just post your concern here before trying?
The "forward" function is the "default function" in PyTorch that will be called if the object is called.
Please check this link for an example.
Serbernari commented
Well, must be problem on my side, i am using PyCharm and it's marks this string as error. Thank you for explaining!