SubGNN icon indicating copy to clipboard operation
SubGNN copied to clipboard

AttributeError: 'SparseTensor' object has no attribute 'sample_adj'

Open rd27995 opened this issue 4 years ago • 3 comments

When CONV =GIN and MINIBATCH =NeighborSampler, I get the following error message (using torch 1.4.0 and CUDA 10.1, torch-sparse=0.6.1)

Can you please suggest if there's anything I am missing here? Thanks in advance for your help!

image

rd27995 avatar Feb 23 '21 17:02 rd27995

When CONV =GIN and MINIBATCH =NeighborSampler, I get the following error message (using torch 1.4.0 and CUDA 10.1, torch-sparse=0.6.1)

Can you please suggest if there's anything I am missing here? Thanks in advance for your help!

image

I find solution from this discussion .

wentinghome avatar Jun 16 '21 01:06 wentinghome

I find new solution to this probleim

https://github.com/rusty1s/pytorch_geometric/issues/1770#issuecomment-718461015

You should update your torch-sparse >=0.6.4

just pip install torch-sparse==0.6.4

youngfish42 avatar Aug 02 '21 13:08 youngfish42

A comment for anybody else checking this in 2023. After running pip install torch-sparse==0.64, there's still a failure when the code internally runs

from torch_sparse import SparseTensor

https://github.com/pyg-team/pytorch_geometric/issues/1770#issuecomment-718461015 mentions additional manual hacks to get 0.6.4 working with PyTorch 1.4.0. That version of PyTorch only support 0.6.1 out of the box.

The core issue is mentioned in this comment by the repo author. GIN embeddings were done with a different PyTorch Geometric version, with code refactoring later on.

mfernezir avatar Jun 02 '23 20:06 mfernezir