Closed hyqyoung closed 4 years ago
The scatter_
call got removed in one of the more recent versions, and you can now simply use torch.scatter(..., reduce='add')
for the same effect.
The
scatter_
call got removed in one of the more recent versions, and you can now simply usetorch.scatter(..., reduce='add')
for the same effect.
Yes, I find the reason is using "pip install torch-geometric" will download the latest version of torch-geometric which is 1.6.1, but the method "torchgeometric.utils.scatter" only exists before version 1.4.3 or earlier. So I just update version 1.4.3 and it works.
from torch_geometric.utils import accuracy
cannot import name 'accuracy' from 'torch_geometric.utils' (/usr/local/lib/python3.7/dist-packages/torch_geometric/utils/__init__.py)
We dropped support for our metric package and moved to torchmetrics
. Where do you see this issue?
I got the issue of ImportError: cannot import name 'index_sort' from 'torch_geometric.utils' (/Users/tuanle/miniforge3/envs/torch-gpu/lib/python3.8/site-packages/torch_geometric/utils/init.py)
When importing 'import torch_geometric', may I ask If someone can help me out?
I use
pytorch 2.1.0 py3.8_0 pytorch pytorch-metric-learning 2.5.0 pypi_0 pypi torch 2.1.0 pypi_0 pypi torch-cluster 1.6.3 pypi_0 pypi torch-geometric 2.5.2 pypi_0 pypi torch-points-kernels 0.6.10 pypi_0 pypi torch-scatter 2.1.2 pypi_0 pypi torch-sparse 0.6.18 pypi_0 pypi torch-spline-conv 1.2.2 pypi_0 pypi torchaudio 2.1.0 py38_cpu pytorch torchdata 0.6.1 pypi_0 pypi torchmetrics 1.2.0 pypi_0 pypi torchnet 0.0.4 pypi_0 pypi torchtext 0.15.2 pypi_0 pypi torchvision 0.16.0 pypi_0 pypi
It got moved to
torch_geometric.utils._index_sort
At best, import via
from torch_geometric.utils import index_sort
❓ Questions & Help
And I find it that there is no scatter_.py under python3.6/site-packages/torch_geometric/utils