Closed mirror111 closed 6 years ago
@mirror111 Hello! Thanks for opening the issue:
In the function evaluate() 1 i think the code encoder_optim.zero_grad() decoder_optim.zero_grad() is unnecessary. and the function evaluate() don't have these parameters.either. 2 when in the evaluate section, the decoder's input should from the top word from decoder's output, or from the real target?
@mirror111 Hello,
You are welcome to give me a pull request :-)
In the LuongAttnDecoderRNN 1 when t=0 decoder_hidden is last encoder hidden state (num_layers num_directions, batch_size, hidden_size).but in EncoderRNN, the last hidden state is (num_layers, batch_size, hidden_size num_directions). is it right? 2 There is a line of code is decoder_output, decoder_hidden = decoder.rnn(emb, decoder_hidden) i think it should be decoder_output, decoder_hidden = self.rnn(emb, decoder_hidden)