按照以下说明进行操作: https://github.com/mathildor/DeepLab-v3/blob/master/g3doc/installation.md
和:
echo %PYTHONPATH%
$PYTHONPATH: 'C:\.....\tensorflow\models\research' : 'C:\.....\tensorflow\models\research\slim' "
,并在遵循此线程之后: https://github.com/tensorflow/models/issues/4364
尝试运行测试文件时,我仍然遇到相同的错误:
python deeplab/model_test.py
Traceback (most recent call last):
File "deeplab/model_test.py", line 21, in <module>
from deeplab import common
ModuleNotFoundError: No module named 'deeplab'
我已经坚持了几天,有人遇到同样的问题吗?
答案 0 :(得分:0)
确保您位于models / research目录中,并且slim和deeplab文件夹都在该目录中。然后,运行以下代码:
export PYTHONPATH = $ PYTHONPATH:pwd
:pwd
/ slim
您无需在上述行中进行任何更改。然后,再次运行train.py,您应该会好起来。
答案 1 :(得分:0)
windows 是 SET PYTHONPATH=%cd%;%cd%\slim