我正在学习本教程:https://github.com/RomRoc/objdet_train_tensorflow_colab/blob/master/objdet_custom_tf_colab.ipynb
当我尝试运行第一段代码时:
!apt-get install -qq protobuf-compiler python-tk
!pip install -q Cython contextlib2 pillow lxml matplotlib PyDrive
!pip install -q pycocotools
%cd ~/models/research
!protoc object_detection/protos/*.proto --python_out=.
import os
os.environ['PYTHONPATH'] += ':/content/models/research/:/content/models/research/slim/'
!python object_detection/builders/model_builder_test.py
我得到这个错误:
/content
object_detection/protos/*.proto: No such file or directory
python3: can't open file 'object_detection/builders/model_builder_test.py': [Errno 2] No such file or directory
正如教程所说,我已经在GoogleColab中安装了所有的库,所以我不明白为什么会出现这个错误,或者如何修复它。任何帮助都将不胜感激
我可以在Google Colab中重新创建您的问题
输出:
解决方案:要解决此问题,您可以在运行代码之前,通过包含以下两行代码,将当前目录
/content
更改为/root/models/research
这是更新后的代码
输出:
相关问题 更多 >
编程相关推荐