Thanks shekhar! I read the problem you pasted here but it seems not same with my question. I want to figure out how to use backward() when doing saliency from RNN model.
The complete code is here 60, and the Saliency part start form line 262.