GFocalV2 icon indicating copy to clipboard operation
GFocalV2 copied to clipboard

ImportError: cannot import name 'force_fp32' from 'mmcv.runner'

Open Lixia1221 opened this issue 3 years ago • 4 comments

(open-mmlab) fsr@titanxp:~/FoveaBox-01$ python tools/train.py configs/foveabox/fovea_r50_fpn_gfl.py Traceback (most recent call last): File "tools/train.py", line 9, in from mmdet.apis import (get_root_logger, init_dist, set_random_seed, File "/home/fsr/FoveaBox-01/mmdet/apis/init.py", line 2, in from .inference import (inference_detector, init_detector, show_result, File "/home/fsr/FoveaBox-01/mmdet/apis/inference.py", line 13, in from mmdet.models import build_detector File "/home/fsr/FoveaBox-01/mmdet/models/init.py", line 1, in from .anchor_heads import * # noqa: F401,F403 File "/home/fsr/FoveaBox-01/mmdet/models/anchor_heads/init.py", line 10, in from .gfl_head import Integral, GFLHead File "/home/fsr/FoveaBox-01/mmdet/models/anchor_heads/gfl_head.py", line 5, in ImportError: cannot import name 'force_fp32' from 'mmcv.runner' (/home/fsr/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/runner/init.py)

Lixia1221 avatar May 17 '21 07:05 Lixia1221

我也遇到了相同的问题,请问您解决了吗?

limeranceofyyqx avatar Apr 20 '23 03:04 limeranceofyyqx

I have same question, My envs is mmcv 2.0.0+cu11.8+torch2.1 I think this is a version problem, but I cannot solve it

zhangkai07 avatar Jun 16 '23 04:06 zhangkai07

我已收到,。

johnson-magic avatar Jun 16 '23 04:06 johnson-magic