lcosmo / DGM_pytorch

49 stars 16 forks source link

TadpoleDataset cannot run #6

Closed hhhhpaaa closed 6 months ago

hhhhpaaa commented 6 months ago

I don't know why Edge is empty, please explain it a little bit. It is worth mentioning that my environment is Python3.10 Pytorch2.1. I hope it is an environment problem rather than a code problem.

class TadpoleDataset(torch.utils.data.Dataset) .... def __getitem__(self, idx): return self.X,self.y,self.mask, [[]]

ValueError: MessagePassing.propagate only supports integer tensors of shape [2, num_messages], torch_sparse.SparseTensor or torch.sparse.Tensor for argument edge_index.

ZeinabRahbar commented 6 months ago

the edge is empty as the tadpole dataset is a tabular data non-graph data and they are performing gnn on this non-graph data

hhhhpaaa commented 6 months ago

the edge is empty as the tadpole dataset is a tabular data non-graph data and they are performing gnn on this non-graph data

Yes, you are right. I'm sorry I didn't read the paper carefully. Can you run this part of the TadpoleDataset code? I configured the environment according to the README.md and still encountered this error.

raise ValueError( ValueError:MessagePassing.propagateonly supports integer tensors of shape[2, num_messages],torch_sparse.SparseTensorortorch.sparse.Tensorfor argumentedge_index.

In addition, I tried to modify the code to use KNN to build the graph structure of TadpoleDataset, but the accuracy was not ideal. This place has puzzled me for a long time, and I look forward to your reply.

ZeinabRahbar commented 6 months ago

You know, I ran it before I have a mydgmversion repository in my progfile you can use part that is said train_tadpole.py you can use it

hhhhpaaa commented 6 months ago

You know, I ran it before I have a mydgmversion repository in my progfile you can use part that is said train_tadpole.py you can use it

Many thanks for your kind and warm help.