practical-pytorch icon indicating copy to clipboard operation
practical-pytorch copied to clipboard

seq2seq translation issues

Open dingguijin opened this issue 8 years ago • 0 comments

  1. softmax or log_softmax must have dim parameter, dim=-1 would be OK. (-1 mean the last dimension)

  2. criterion (NLLLoss needs 2d as input, so change decoder_output[0] to decoder_output would be OK.

  3. time_since has divide zero error, change time_since(start, epoch / n_epochs) to time_since(start, epoch * 1.0 / n_epochs * 1.0)

Python 2.7, Torch 0.3.0

dingguijin avatar Jan 12 '18 07:01 dingguijin