Gradient feedback error
FeifanFu opened this issue · 4 comments
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [8, 9, 196]], which is output 0 of IndexPutBackward0, is at version 2; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [8, 9, 196]], which is output 0 of IndexPutBackward0, is at version 2; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).
Hello! Can you provide more details for this error? This kind of RuntimeError sometimes occurs when using operations like '+='.
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [8, 9, 196]], which is output 0 of IndexPutBackward0, is at version 2; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).
Hello! Can you provide more details for this error? This kind of RuntimeError sometimes occurs when using operations like '+='.
According to the requirements of the training, running it now will encounter this error.
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [8, 9, 196]], which is output 0 of IndexPutBackward0, is at version 2; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).
Hello! Can you provide more details for this error? This kind of RuntimeError sometimes occurs when using operations like '+='.
I am using ViT-B.
Thank you for the feedback! The requirements.txt and README.md have been updated. This version should be working.