pytorch-seq2seq icon indicating copy to clipboard operation
pytorch-seq2seq copied to clipboard

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?

Open Decalogue opened this issue 6 years ago • 2 comments

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!

Decalogue avatar Sep 05 '18 05:09 Decalogue

@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.

pskrunner14 avatar Sep 06 '18 01:09 pskrunner14

@pskrunner14 Thank you so much!

Decalogue avatar Sep 06 '18 04:09 Decalogue