implus / GFocalV2

Generalized Focal Loss V2: Learning Reliable Localization Quality Estimation for Dense Object Detection, CVPR2021

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Lixia1221 opened this issue · 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)

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

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