Solved by theevann in post #2 
              
              
                encoder.forward(...) and encoder(...) are doing nearly the same thing. 
You can check the doc where it is explained that: 

Although the recipe for forward pass needs to be defined within this function, one should call the instance afterwards instead of this since the former takes care of running th…