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

Hi! When I use examples.py for lannguage translation, an error occured in def len_filter if I use all train_datasets. But when I use part of train_datasets, it works well. Could you please tell me why? #162

Open Decalogue opened 6 years ago

Decalogue commented 6 years ago

Hi! When I use examples.py for lannguage translation, an error occured in 'def len_filter' if I use all trainning datasets. But when I use part of trainning datasets, it works well. Could you please tell me why? The AttributeError is like this: File "train_seq2seq.py", line 81, in len_filter return len(example.src) <= max_len and len(example.tgt) <= max_len AttributeError: 'Example' object has no attribute 'tgt' Thank you!

pskrunner14 commented 6 years ago

@Decalogue You could pull develop and try implementing your script again. Seq2seqDataset has been introduced after #163. However things might be a little unstable as develop is pushed to weekly so I'd recommend you either create a fork or wait until the next alpha release v0.1.7.

Decalogue commented 6 years ago

@pskrunner14 Thank you so much!