one of the variables needed for gradient computation has been modified by an inplace operation
i use  the model of rbt3 to run a pretrain model

self.model = AutoModel.from_pretrained("/workspace/wanglei/data_set/rbt3")
self.model.train()

nodes = self.model(**rnn_nodes_input_gpu).pooler_output

but got a error
"
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [287, 768]], which is output 0 of TanhBackward, is at version 2; 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).
"

Hi could please a few more details, like what model are you using (bert, roberta etc) and code snippet so we can reproduce this ?<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.