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).
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).