GhostQ99 / RobustTrainingGNN

14 stars 1 forks source link

Can I Know the version of PyTorch? #3

Open Jaehyung-Lim opened 6 months ago

Jaehyung-Lim commented 6 months ago

Can I Know the version of PyTorch?

When I train RTGNN, RuntimeError has occurred in line 246 (total_loss.backward()). How can I fix this issue?

Details about error are as follows.

one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [868282]], which is output 0 of ReluBackward0, is at version 1; expected version 0 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True). File "RobustTrainingGNN/model/RTGNN.py", line 246, in train total_loss.backward() File "RobustTrainingGNN/model/RTGNN.py", line 187, in fit self.train(epoch, features, edge_index, idx_train, idx_val, noise_idx, clean_idx) File "RobustTrainingGNN/main.py", line 71, in model.fit(features, adj, noise_labels, labels, idx_train, idx_val, noise_idx, clean_idx) RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [868282]], which is output 0 of ReluBackward0, is at version 1; expected version 0 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).

zohairshafi commented 1 month ago

I have the same issue - did you manage to get around it?