Solved by Paritosh in post #4 
              
              
                I tried with a minimal example, and I don’t see unused parameters affecting the forward pass. But I am still facing the problem in my main code, so there should be some mistake that I am not able to identify.