Open StrangeTcy opened 5 years ago
If you use a list of torch.LongTensor.zero_()
s instead, it seems to work.
I think this issue is related with pytorch version you're using. Have you installed dependencies from the requirements.txt inside a virtualenv as explained in README?
As of now, this code works with pytorch 0.3.1. In later versions torch.stack() takes a sequence of Tensors as argument, so, if you are using a newer version of pytorch, torch.stack(list(padded_questions))
should work.
However, other things should be adjusted if you use another version. Hence, I encourage you to install version 0.3.1 inside a virtualenv.
train.py
fails on both training from scratch and using a pre-trained model with the following error: