PaddlePaddle / PaddleClas

A treasure chest for visual classification and recognition powered by PaddlePaddle
Apache License 2.0
5.5k stars 1.17k forks source link

paddlecls特征提取模型微调 #3170

Open chinesejunzai12 opened 5 months ago

chinesejunzai12 commented 5 months ago
  1. 相关版本如下: paddleclas 2.5.1 paddlepaddle 2.5.2 paddlepaddle-gpu 2.5.2.post112 2.python版本号: Python 3.7.13
  2. cuda/cudnn版本 cuda11.2/cudnn8.1 文档链接: https://github.com/PaddlePaddle/PaddleClas/blob/release/2.5/docs/zh_CN/training/metric_learning/training.md 在运行命令之后python3.7 tools/train.py \ -c ./ppcls/configs/quick_start/MobileNetV1_retrieval.yaml \ -o Arch.Backbone.pretrained=True \ -o Global.device=gpu 报如下问题: Traceback (most recent call last): File "tools/train.py", line 32, in engine = Engine(config, mode="train") File "/mnt/project/PaddleClas/ppcls/engine/engine.py", line 99, in init self.device = paddle.set_device(self.config["Global"]["device"]) File "/usr/local/lib/python3.7/dist-packages/paddle/device/init.py", line 266, in set_device place = _convert_to_place(device) File "/usr/local/lib/python3.7/dist-packages/paddle/device/init.py", line 181, in _convert_to_place "The device should not be 'gpu', " ValueError: The device should not be 'gpu', since PaddlePaddle is not compiled with CUDA 请问这个bug是因为版本不匹配还是其他问题?
cuicheng01 commented 4 months ago

请问您装的是Paddle的GPU版本吗?建议重新uninstall后再装下GPU版的Paddle呢

chinesejunzai12 commented 4 months ago

是paddle的GPU版本, 已经解决了, 是版本的问题