我使用张量流来实现nmt
https://www.tensorflow.org/versions/master/tutorials/seq2seq#sequence-to-sequence-models
我将为韩语和英语创建NMT。 我创建的数据类似于Tensorflow提供的数据。分别对应于训练,开发和测试数据。
但是,会继续出现以下错误。我不知道出了什么问题。
File "/Users/hapkim/miniconda3/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/Users/hapkim/miniconda3/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/hapkim/Desktop/stat_kaggle/nmt/nmt/nmt.py", line 605, in <module>
tf.app.run(main=main, argv=[sys.argv[0]] + unparsed)
File "/Users/hapkim/Desktop/stat_kaggle/seq2seq_tutorial/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 126, in run
_sys.exit(main(argv))
File "/Users/hapkim/Desktop/stat_kaggle/nmt/nmt/nmt.py", line 598, in main
run_main(FLAGS, default_hparams, train_fn, inference_fn)
File "/Users/hapkim/Desktop/stat_kaggle/nmt/nmt/nmt.py", line 591, in run_main
train_fn(hparams, target_session=target_session)
File "/Users/hapkim/Desktop/stat_kaggle/nmt/nmt/train.py", line 303, in train
sample_src_data = inference.load_data(dev_src_file)
File "/Users/hapkim/Desktop/stat_kaggle/nmt/nmt/inference.py", line 75, in load_data
inference_data = f.read().splitlines()
File "/Users/hapkim/Desktop/stat_kaggle/seq2seq_tutorial/lib/python3.6/codecs.py", line 493, in read
newdata = self.stream.read()
File "/Users/hapkim/Desktop/stat_kaggle/seq2seq_tutorial/lib/python3.6/site-packages/tensorflow/python/lib/io/file_io.py", line 120, in read
self._preread_check()
File "/Users/hapkim/Desktop/stat_kaggle/seq2seq_tutorial/lib/python3.6/site-packages/tensorflow/python/lib/io/file_io.py", line 80, in _preread_check
compat.as_bytes(self.__name), 1024 * 512, status)
File "/Users/hapkim/Desktop/stat_kaggle/seq2seq_tutorial/lib/python3.6/site-packages/tensorflow/python/framework/errors_impl.py", line 519, in __exit__
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: None.ko; No such file or directory
命令如下。
我的问题是,我不确定是否存在None.ko并且显示NotFoundError。
python -m nmt.nmt \
--src=ko --tgt=en \
--vocab_prefix=/tmp/nmt_data/mydata/vocab \
--train_prefix=/tmp/nmt_data/mydata/train \
--dev_prefix=/tmp/nmt_data/mydata/tst2012 \
--test_prefix=/tmp/nmt_data/mydata/tst2013 \
--out_dir=/tmp/nmt_model \
--num_train_steps=12000 \
--steps_per_stats=100 \
--num_layers=2 \
--num_units=128 \
--dropout=0.2 \
--metrics=bleu
答案 0 :(得分:0)
我刚刚删除了日志数据,解决了这个问题。