我尝试在Azure ML上的计算示例上运行对象检测器。我使用的是Tensorflow Object Detection API,并根据www.example.com安装了Tensorflow沿着CUDA和CUDNNtensorflow.org/install/gpu。
运行以下命令时:
python Tensorflow/models/research/object_detection/model_main_tf2.py --model_dir=Tensorflow/workspace/models/my_ssd_mobnet --pipeline_config_path=Tensorflow/workspace/models/my_ssd_mobnet/pipeline.config --num_train_steps=2000
字符串
我得到以下错误:
2021-08-09 12:07:09.368060: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library libcudart.so.11.0
Traceback (most recent call last):
File "Tensorflow/models/research/object_detection/model_main_tf2.py", line 32, in <module>
from object_detection import model_lib_v2
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/object_detection/model_lib_v2.py", line 29, in <module>
from object_detection import eval_util
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/object_detection/eval_util.py", line 35, in <module>
from object_detection.metrics import coco_evaluation
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/object_detection/metrics/coco_evaluation.py", line 25, in <module>
from object_detection.metrics import coco_tools
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/object_detection/metrics/coco_tools.py", line 51, in <module>
from pycocotools import coco
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/pycocotools/coco.py", line 49, in <module>
import matplotlib.pyplot as plt
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/matplotlib/pyplot.py", line 2282, in <module>
switch_backend(rcParams["backend"])
File "/anaconda/envs/azureml_py36/lib/python3.6/site-packages/matplotlib/pyplot.py", line 221, in switch_backend
backend_mod = importlib.import_module(backend_name)
File "/anaconda/envs/azureml_py36/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named 'matplotlib_inline'
型
- Azure中的VM正在运行Ubuntu 18.04.5 LTS。
- 我已经通过pip安装了
matplotlib
和matplotlib-inline
并成功导入 - 代码在VS Code中运行,该代码连接到Azure中的计算示例。
- CUDA版本11.0
- Python版本3.8.1
我没有在网上找到任何类似的问题,并希望在这方面的任何帮助。
1条答案
按热度按时间gajydyqb1#
改变后端对我来说是这样的:
字符串