NMT、tensorflow、NotFoundError 错误

NMT, tensorflow, error with NotFoundError

我正在使用 tensorflow 来实现 nmt

https://www.tensorflow.org/versions/master/tutorials/seq2seq#sequence-to-sequence-models

我要为韩语和英语创建 NMT。 我创建的数据类似于 Tensorflow 提供的数据。分别对应train、dev、test数据。

但是,继续出现以下错误。不知道怎么回事。

  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

我刚刚通过删除日志数据解决了这个问题。