Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
syluofoden opened this issue Sep 11, 2024 · 5 comments
Open

Comments

@syluofoden
Copy link

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?

@ningsummerw
Copy link

请问你解决这个问题了吗,我也遇到了这个同样的问题

@syluofoden
Copy link
Author

syluofoden commented Dec 6, 2024 via email

@ningsummerw
Copy link

好的,谢谢,请问你复现出这个代码吗,有些问题能向你咨询吗,非常感谢

@syluofoden
Copy link
Author

syluofoden commented Dec 9, 2024 via email

@syluofoden
Copy link
Author

syluofoden commented Dec 9, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants