tunz / transformer-pytorch

Transformer implementation in PyTorch.
https://tunz.kr/post/4
MIT License
464 stars 102 forks source link

TypeError #2

Closed liperrino closed 5 years ago

liperrino commented 5 years ago

python3 train.py --problem wmt32k --output_dir ./output --data_dir ./wmt32k_data Traceback (most recent call last): File "train.py", line 211, in main() File "train.py", line 156, in main opt.batch_size, device, opt) File "/home/vivien/Bureau/transformer-pytorch/dataset/problem.py", line 12, in prepare translation.prepare(max_length, batch_size, device, opt, data_dir) File "/home/vivien/Bureau/transformer-pytorch/dataset/translation.py", line 157, in prepare pad_token=pad, lower=True, eos_token='') TypeError: init() got an unexpected keyword argument 'is_target'

tunz commented 5 years ago

Hello. it requires the latest version of torchtext. please upgrade your torchtext, and actually is_target is not necessary, so I just removed it for now.