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

Import error of datapoints #416

Open
Subhankhan41 opened this issue Aug 15, 2024 · 3 comments
Open

Import error of datapoints #416

Subhankhan41 opened this issue Aug 15, 2024 · 3 comments
Assignees

Comments

@Subhankhan41
Copy link

Hi,

I tried from torchvision import data points and also from torchvision.prototype import datapoints, but I am still having ImportError: cannot import name 'datapoints' from 'torchvision' and ImportError: cannot import name 'datapoints' from 'torchvision.prototype respectively. The rest of things are working fine including from torchvision.prototype import transforms as T. Any idea why it's happening?

from torchvision.prototype import transforms as T
from torchvision.prototype import datapoints

ImportError: cannot import name 'datapoints' from 'torchvision.prototype' (C:\Users\Subhan.Khan\AppData\Local\anaconda3\envs\myconda\Lib\site-packages\torchvision\prototype_init_.py)

from torchvision.prototype import transforms as T
from torchvision import datapoints

ImportError: cannot import name 'datapoints' from 'torchvision'

@lyuwenyu
Copy link
Owner

lyuwenyu commented Aug 16, 2024

You can use rtdetrv2_pytorch, otherwise your packages must match corresponding version.

torch==2.0.1
torchvision==0.15.2

@anewcatwhy
Copy link

Hi, 你好

I tried from torchvision import data points and also from torchvision.prototype import datapoints, but I am still having ImportError: cannot import name 'datapoints' from 'torchvision' and ImportError: cannot import name 'datapoints' from 'torchvision.prototype respectively. The rest of things are working fine including from torchvision.prototype import transforms as T. Any idea why it's happening?我尝试从 torchvision 导入数据点,也尝试从 torchvision.prototype 导入数据点,但我仍然遇到 ImportError:无法从 'torchvision' 导入名称 'datapoints' 和 ImportError:无法分别从 'torchvision.prototype' 导入名称 'datapoints'。其余事情都工作正常,包括从 torchvision.prototype 导入转换为 T。知道为什么会这样吗?

from torchvision.prototype import transforms as T from torchvision.prototype import datapoints从 torchvision.prototype 导入数据点

ImportError: cannot import name 'datapoints' from 'torchvision.prototype' (C:\Users\Subhan.Khan\AppData\Local\anaconda3\envs\myconda\Lib\site-packages\torchvision\prototype_init_.py)ImportError:无法从“torchvision.prototype”导入名称“数据点”(C:\Users\Subhan.Khan\AppData\Local\anaconda3\envs\myconda\Lib\site-packages\torchvision\prototype_init_.py)

from torchvision.prototype import transforms as T from torchvision import datapoints从 torchvision 导入数据点

ImportError: cannot import name 'datapoints' from 'torchvision'ImportError:无法从“torchvision”导入名称“datapoints”

excuse me ,do you solve it with the author's ways

@anewcatwhy
Copy link

it is solved

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

3 participants