IBM / pytorch-seq2seq

An open source framework for seq2seq models in PyTorch.
https://ibm.github.io/pytorch-seq2seq/public/index.html
Apache License 2.0
1.5k stars 376 forks source link

RuntimeError when running Samplescript without attention in the develop branch #181

Closed amjltc295 closed 5 years ago

amjltc295 commented 5 years ago

I got the same error as #109 for the develop branch when use_attention is set to False in sample.py:

RuntimeError: invalid argument 2: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Call
.contiguous() before .view(). at /pytorch/aten/src/THC/generic/THCTensor.cpp:226

However, the line predicted_softmax = function(... in forwrad_step() in model/decoder_rnn.py disappears. I'm not sure how/where to solve this problem.

amjltc295 commented 5 years ago

The related code is removed in commt adab17b8d7649de2be4989ca99e2674df6dc46bc

amjltc295 commented 5 years ago

Fixed by #182