Hi, @InnovArul
The error occurs before loss_mat and is on this line “pred, h = model(batch.x, batch.p, batch.edge_index, batch.edge_attr, batch.batch)”
Traceback (most recent call last):
File “finetune.py”, line 286, in 
main()
File “finetune.py”, line 256, in main
train(args, model, device, train_loader, optimizer)
File “finetune.py”, line 48, in train
batch.edge_attr, batch.batch)
File “/home/liuy69/bin/anaconda2/envs/GCN_property/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 727, in _call_impl
result = self.forward(*input, **kwargs)
File “/home/liuy69/projects/GCN_Syn/examples/pretrain-gnns/chem/model.py”, line 140, in forward
node_representation = self.gnn(x= x, edge_index = edge_index, edge_attr = edge_attr, p = p)
File “/home/liuy69/bin/anaconda2/envs/GCN_property/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 727, in _call_impl
result = self.forward(*input, **kwargs)
File “/home/liuy69/projects/GCN_Syn/examples/pretrain-gnns/chem/model.py”, line 52, in forward
sim_sc = kernel_layer(data = data)
File “/home/liuy69/bin/anaconda2/envs/GCN_property/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 727, in _call_impl
result = self.forward(*input, **kwargs)
File “/home/liuy69/projects/GCN_Syn/examples/pretrain-gnns/chem/kernels.py”, line 569, in forward
return self.conv(data=data)
File “/home/liuy69/bin/anaconda2/envs/GCN_property/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 727, in _call_impl
result = self.forward(*input, **kwargs)
File “/home/liuy69/projects/GCN_Syn/examples/pretrain-gnns/chem/kernels.py”, line 506, in forward
deg, x, p, edge_index, edge_attr)
File “/home/liuy69/projects/GCN_Syn/examples/pretrain-gnns/chem/kernels.py”, line 451, in convert_graph_to_receptive_field
deg=deg, x=x, edge_index=edge_index, p=p, edge_attr=edge_attr)
File “/home/liuy69/projects/GCN_Syn/examples/pretrain-gnns/chem/kernels.py”, line 425, in get_neighbor_nodes_and_edges_of_degree
edge_attr, edge_index, center_index[i])
File “/home/liuy69/projects/GCN_Syn/examples/pretrain-gnns/chem/kernels.py”, line 393, in get_edge_attr_support_from_center_node
input=edge_attr, dim=0, index=bond_id)
RuntimeError: Input, output and indices must be on the current device