You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using your great code! I have slightly modified your models.py to fit my regression task, but when I run the train.py, error occurred:
Traceback (most recent call last):
File "train.py", line 1273, in
main()
File "train.py", line 1250, in main
benchmark_task(prog_args, writer=writer)
File "train.py", line 1024, in benchmark_task
writer=writer,
File "train.py", line 190, in train
ypred, att_adj = model(h0, adj, batch_num_nodes, assign_x=assign_input) #use the 'forward' that is in model class
File "/home/omnisky/venv/lib/python3.7/site-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "/home/omnisky/Documents/individual_variance/gnn-model-explainer/models.py", line 570, in forward
self.assign_pred_modulesi
File "/home/omnisky/venv/lib/python3.7/site-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "/home/omnisky/venv/lib/python3.7/site-packages/torch/nn/modules/linear.py", line 87, in forward
return F.linear(input, self.weight, self.bias)
File "/home/omnisky/venv/lib/python3.7/site-packages/torch/nn/functional.py", line 1372, in linear
output = input.matmul(weight.t())
RuntimeError: Expected object of device type cuda but got device type cpu for argument #2 'mat2' in call to _th_mm
Can you give some advice about that? Thank you for your kind assistance!
Zeng
The text was updated successfully, but these errors were encountered:
I have the same problem. Probably, the reason is that prog_args.gpu is set to False, not sure why it is False since const is True and action is 'store_const' (at least this is what happened on my PC). My solution is kind of like brute force by comment out all if-condition that involves prog_args.gpu/self.gpu, which enforces the program to send all data into GPU.
I wonder if the authors could provide some hint on how to fix the weird prog_args.gpu value assignment.
Hi
I am using your great code! I have slightly modified your
models.py
to fit my regression task, but when I run thetrain.py
, error occurred:Can you give some advice about that? Thank you for your kind assistance!
Zeng
The text was updated successfully, but these errors were encountered: