0
トレーニング中にCNN分類モデルを構築し、チェックポイントを保存しました。このコードを実行した後。NotFoundError:関数tf.train.latest_checkpoint()を使用中に遭遇しました
checkpoint_dir = "/home/user/cnn-model/trained_model_1506946529/"
checkpoint_file = tf.train.latest_checkpoint(checkpoint_dir + 'checkpoints')
私はエラーを取得する:
NotFoundError Traceback (most recent call last)
<ipython-input-60-8de4d687f60c> in <module>()
5 checkpoint_dir += '/'
6 print (checkpoint_dir + 'checkpoints')
----> 7 checkpoint_file = tf.train.latest_checkpoint(checkpoint_dir + 'checkpoints')
8 print (checkpoint_file)
/usr/local/lib/python3.5/dist-packages/tensorflow/python/training/saver.py in latest_checkpoint(checkpoint_dir, latest_filename)
1612 v1_path = _prefix_to_checkpoint_path(ckpt.model_checkpoint_path,
1613 saver_pb2.SaverDef.V1)
-> 1614 if file_io.get_matching_files(v2_path) or file_io.get_matching_files(
1615 v1_path):
1616 return ckpt.model_checkpoint_path
/usr/local/lib/python3.5/dist-packages/tensorflow/python/lib/io/file_io.py in get_matching_files(filename)
330 # Convert the filenames to string from bytes.
331 compat.as_str_any(matching_filename)
--> 332 for single_filename in filename
333 for matching_filename in pywrap_tensorflow.GetMatchingFiles(
334 compat.as_bytes(single_filename), status)
/usr/lib/python3.5/contextlib.py in __exit__(self, type, value, traceback)
64 if type is None:
65 try:
---> 66 next(self.gen)
67 except StopIteration:
68 return
/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/errors_impl.py in raise_exception_on_not_ok_status()
464 None, None,
465 compat.as_text(pywrap_tensorflow.TF_Message(status)),
--> 466 pywrap_tensorflow.TF_GetCode(status))
467 finally:
468 pywrap_tensorflow.TF_DeleteStatus(status)
NotFoundError: /home/user/cnn-model/trained_model_1506946529/checkpoints
ファイルの場所が存在し、そのチェックポイントが、私はそれを軽減するために何ができるのでしょうか?