Thank you, Thomas!
I want to calculate the value in the evaluation mode, so that it could be compared with the regular forward( ) output.
I just figure out a workaround: copying the code of the evaluation mode, and use an boolean variable to control the execution. It works.