Source code for AAAI2023 "T2-GNN: Graph Neural Networks for Graphs with Incomplete Features and Structure via Teacher-Student Distillation"
12
stars
0
forks
source link
python run.py --dataset cornell --Ts 1.0 --topk 5 --lambd 0.9这行指令并没有顺利运行,请问您有遇到吗? #1
Open
manxiaoyu opened 10 months ago
我的环境是python3.8.pytorch2.0.0,但再运行python run.py --dataset cornell --Ts 1.0 --topk 5 --lambd 0.9这行指令并没有顺利运行,出现了下面的错误,请问您有遇到吗? Traceback (most recent call last): File "/home/visionx/anaconda3/envs/t2gnn/lib/python3.8/site-packages/scipy/sparse/_compressed.py", line 80, in init arg1 = np.asarray(arg1) File "/home/visionx/anaconda3/envs/t2gnn/lib/python3.8/site-packages/torch/_tensor.py", line 970, in array return self.numpy() TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "run.py", line 21, in
train = Train(args,repeat,acc_fea,acc_str,acc_stu)
File "/media/visionx/monica/project24/T2-GNN/train.py", line 22, in init
self.load_data()
File "/media/visionx/monica/project24/T2-GNN/train.py", line 69, in load_data
ppr_matrix = topk_ppr_matrix(sp.csr_matrix(self.ttadj, dtype=float), args.alpha_ppr, args.epsilon,
File "/home/visionx/anaconda3/envs/t2gnn/lib/python3.8/site-packages/scipy/sparse/_compressed.py", line 82, in init
raise ValueError("unrecognized {}_matrix constructor usage"
ValueError: unrecognized csr_matrix constructor usage