twairball / t2t_wmt_zhen

NMT for chinese-english using tensor2tensor
MIT License
47 stars 12 forks source link

raise NotImplementedError() #3

Closed wingsyuan closed 6 years ago

wingsyuan commented 6 years ago

请问,我在最新的tensor2tensor版本上跑您的程序,出现以下错误,莫非是版本问题,可以帮忙看看吗? 谢谢! /t2t_wmt$ sh ./main/gen_base.sh Building prefix dict from the default dictionary ... Loading model from cache /tmp/jieba.cache Loading model cost 0.896 seconds. Prefix dict has been built succesfully. Traceback (most recent call last): File "/software/home/wings/anaconda3/bin/t2t-datagen", line 27, in tf.app.run() File "/software/home/wings/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run _sys.exit(main(argv)) File "/software/home/wings/anaconda3/bin/t2t-datagen", line 23, in main t2t_datagen.main(argv) File "/software/home/wings/anaconda3/lib/python3.6/site-packages/tensor2tensor/bin/t2t_datagen.py", line 190, in main generate_data_for_registered_problem(problem) File "/software/home/wings/anaconda3/lib/python3.6/site-packages/tensor2tensor/bin/t2t_datagen.py", line 240, in generate_data_for_registered_problem problem.generate_data(data_dir, tmp_dir, task_id) File "/software/home/wings/anaconda3/lib/python3.6/site-packages/tensor2tensor/data_generators/text_problems.py", line 294, in generate_data self.generate_encoded_samples(data_dir, tmp_dir, split)), paths) File "/software/home/wings/anaconda3/lib/python3.6/site-packages/tensor2tensor/data_generators/text_problems.py", line 254, in generate_encoded_samples generator = self.generate_samples(data_dir, tmp_dir, dataset_split) File "/software/home/wings/anaconda3/lib/python3.6/site-packages/tensor2tensor/data_generators/translate.py", line 52, in generate_samples datasets = self.source_data_files(dataset_split) File "/software/home/wings/anaconda3/lib/python3.6/site-packages/tensor2tensor/data_generators/translate.py", line 45, in source_data_files raise NotImplementedError() NotImplementedError

twairball commented 6 years ago

你好,这个库用当时的 tensor2tensor; 相关代码有merge 进 master 库, 所以可以直接参考 master 库的中英翻译代码。