代码环境:
python = 3.6
torch = 1.6.0
torchvision = 0.7.0
cuda = 9.2
detectron2 = 0.4
安装torch和torchvision命令(来自pytorch官网V1.6.0)
conda install pytorch==1.6.0 torchvision==0.7.0 cudatoolkit=9.2 -c pytorch
安装detectron2命令对应torch1.6.0版本(来自detectron2官网的installation教程)
python -m pip install detectron2 -f .6/index.html
我对训练的模型进行评估时出现的问题,评估用的函数是detectron2.evaluation.inference_on_dataset(model, data_loader, evaluator)
RuntimeError:
object has no attribute nms:Filen "/home/scau2/anaconda2/envs/swin-t/lib/python3.6/site-packages/ops/boxes.py", line 40***return s(boxes, scores, iou_threshold)-------------------------<----HERE'nms' is being compiled since it was called from 'batched_nms'
更新代码环境:
python = 3.6
torch = 1.7.0
torchvision = 0.8.0
cuda = 9.2
detectron2 = 0.4
安装torch和torchvision命令(来自pytorch官网V1.6.0)
conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=9.2 -c pytorch
安装detectron2命令对应torch1.7.0版本(来自detectron2官网的installation教程)
python -m pip install detectron2 -f .7/index.html
问题解决!!!
本文发布于:2024-02-03 23:37:37,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170697689151655.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |