要在Google Colab中训练模型时遇到编码错误

时间:2020-05-13 10:28:14

标签: python tensorflow google-colaboratory training-data

我使用的代码是:

!python3 object_detection/model_main.py \
--pipeline_config_path=/gdrive/My\ Drive/object_detection/models/research/object_detection/samples/configs/ssd_mobilenet_v2_coco.config \
--model_dir=training/

我遇到的错误是:

**Traceback (most recent call last):
  File "object_detection/model_main.py", line 109, in <module>
    tf.app.run()
  File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/platform/app.py", line 40, in run
    _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
  File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 299, in run
    _run_main(main, args)
  File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 250, in _run_main
    sys.exit(main(argv))
  File "object_detection/model_main.py", line 71, in main
    FLAGS.sample_1_of_n_eval_on_train_examples))
  File "/content/drive/My Drive/object_detection/models/research/object_detection/model_lib.py", line 617, in create_estimator_and_inputs
    pipeline_config_path, config_override=config_override)
  File "/content/drive/My Drive/object_detection/models/research/object_detection/utils/config_util.py", line 103, in get_configs_from_pipeline_file
    proto_str = f.read()
  File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/lib/io/file_io.py", line 122, in read
    self._preread_check()
  File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/lib/io/file_io.py", line 84, in _preread_check
    compat.as_bytes(self.__name), 1024 * 512)
tensorflow.python.framework.errors_impl.NotFoundError:/gdrive/My Drive/object_detection/models/research/object_detection/samples/configs/ssd_mobilenet_v2_coco.config; No such file or directory

我已经检查了很多次,以至于该路径已经正确且已连接,但不知道为什么仍然会发生此错误,请帮忙!

0 个答案:

没有答案