Closed wangyirui closed 6 years ago
Are you training an LSTM model? Can you paste the entire log and the command you're running, please
Yes. I am using LSTM (lstm_luong_wmt_en_de). And my PyTorch is 0.4.0. (I use the same command in the previous versions (cloned 3 or 4 days ago) The command I use is: CUDA_VISIBLE_DEVICES=0 python train.py data-bin/wmt18.tokenized.de-en --source-lang de --target-lang en --optimizer adam --lr 1e-3 --clip-norm 5.0 --arch lstm_luong_wmt_en_de --save-dir checkpoints/blstm
The log is:
| [de] dictionary: 8791 types
| [en] dictionary: 6655 types
| data-bin/wmt18.tokenized.de-en train 259668 examples
| data-bin/wmt18.tokenized.de-en valid 11813 examples
| model lstm_luong_wmt_en_de, criterion CrossEntropyCriterion
| num. model params: 93171655
| training on 1 GPUs
| max tokens per GPU = 6000 and max sentences per GPU = None
| epoch 001: 0%| | 0/1694 [00:00<?, ?it/s]Traceback (most recent call last):
File "train.py", line 29, in
Yep, there was a change in behavior in the latest PyTorch:
>>> x = torch.autograd.Variable(torch.rand(5))
>>> isinstance(x, torch.autograd.Variable)
True
>>> isinstance(x.data, torch.autograd.Variable)
True
I'll submit a fix shortly.
I just cloned the lasted version (which claimed has fixed the round bug reported before). But I meet a new error: File "/home/kimi/Desktop/fairseq-py/fairseq/utils.py", line 292, in convert_padding_direction assert not isinstance(src_tokens, Variable) AssertionError