MingChen-Sun / GPPT

56 stars 14 forks source link

AttributeError:'CoraGraphDataset' object has no attribute 'graph' #4

Open Lylovewhy opened 1 year ago

Lylovewhy commented 1 year ago

Traceback (most recent call last): File "/home/ylin/GPPT/./GPPT.py", line 205, in main(args) File "/home/ylin/GPPT/./GPPT.py", line 158, in main g,features,labels,in_feats,n_classes,n_edges,train_nid,val_nid,test_nid,device=utils.get_init_info(args) File "/home/ylin/GPPT/utils.py", line 180, in get_init_info g,features,labels,train_mask,val_mask,test_mask,in_feats,n_classes,n_edges=my_load_data(args) File "/home/ylin/GPPT/utils.py", line 40, in my_load_data n_edges = data.graph.number_of_edges() AttributeError: 'CoraGraphDataset' object has no attribute 'graph'

looskysky commented 11 months ago

Replace as: n_edges = data[0].num_edges