Runtime error trying to backward through the graph a second time

I am trying to implement RNN in pytorch to classify tweets. While training I have set retain_graph = True in loss.backward() . However, I still receive this error in Jupyter notebook

Can you share the notebook?

sentiment analysis

The issue is resolved, the error had been since torch.autorgrad.Variable has been deprecated. Using tensor.requires_grad = True works fine.

Thank you