Solved by Mengran_Wang in post #7 
              
              
                There’s still a small problem when I avoided to do optimizer step after calling backward() in training mode. the problem is: for the same input sentence and the same model, the saliencies are different between the first time and second time I called. If the parameters are totally fixed, the results …