ZhangGongjie / Meta-DETR

[T-PAMI 2022] Meta-DETR for Few-Shot Object Detection: Official PyTorch Implementation
MIT License
388 stars 84 forks source link

cannot import name '_NewEmptyTensorOp' from 'torchvision.ops.misc' #85

Open syluofoden opened 2 months ago

syluofoden commented 2 months ago

Traceback (most recent call last): File "main.py", line 13, in import datasets File "/home/lsy/Meta-DETR-main/datasets/init.py", line 6, in from .dataset import build File "/home/lsy/Meta-DETR-main/datasets/dataset.py", line 10, in from util.misc import get_local_rank, get_local_size File "/home/lsy/Meta-DETR-main/util/misc.py", line 24, in from torchvision.ops.misc import _NewEmptyTensorOp ImportError: cannot import name '_NewEmptyTensorOp' from 'torchvision.ops.misc' (/home/lyk/anaconda3/envs/mdetr/lib/python3.8/site-packages/torchvision/ops/misc.py) I encountered the above issue during runtime. My versions of torch and torchvision are as follows. pytorch == 1.10.q+cu111 torchvision == 0.11.2+cu111 Could you please advise how to resolve this?