我正在关注Google 在 TPU 帖子上的对象检测,并且在培训方面遇到了困难。
查看作业日志,我可以看到 ml-engine 为各种包运行大量 pip 安装,提供 TPU,然后提交以下内容:
Running command: python -m object_detection.model_tpu_main
--model_dir=gs://{MY_BUCKET}/train --tpu_zone us-central1
--pipeline_config_path=gs://{MY_BUCKET}/data/pipeline.config
--job-dir gs://{MY_BUCKET}/train
然后它会出错:
message: "Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/root/.local/lib/python2.7/site-packages/object_detection/model_tpu_main.py", line 30, in <module>
from object_detection import model_lib
File "/root/.local/lib/python2.7/site-packages/object_detection/model_lib.py", line 26, in <module>
from object_detection import eval_util
File "/root/.local/lib/python2.7/site-packages/object_detection/eval_util.py", line 28, in <module>
from object_detection.metrics import coco_evaluation
File "/root/.local/lib/python2.7/site-packages/object_detection/metrics/coco_evaluation.py", line 20, in <module>
from object_detection.metrics import coco_tools
File "/root/.local/lib/python2.7/site-packages/object_detection/metrics/coco_tools.py", line 47, in <module>
from pycocotools import coco
File "/root/.local/lib/python2.7/site-packages/pycocotools/coco.py",
line 49
import matplotlibnmatplotlib.use('Agg')nimport matplotlib.pyplot as plt
^
SyntaxError: invalid syntax
"
这是我第一次使用 ml-engine,我被卡住了。我发现错误引用 python2.7 很奇怪,因为我在 python3.6 环境中从笔记本电脑提交了作业。
关于从这里去哪里或做什么的任何想法?