unilm icon indicating copy to clipboard operation
unilm copied to clipboard

Update L. 116 of backbone.py

Open BenCretois opened this issue 3 years ago • 0 comments

When fine-tuning the network for our own problem, we encountered the error RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [32, 768, 248]].

This seemed to be triggered by the in place operation occuring L. 116. To solve this we replaced x += x_conv by x = x.clone() + x_conv

BenCretois avatar Feb 16 '23 13:02 BenCretois