Solved by ptrblck in post #2 
              
              
                Besides setting the requires_grad attribute to False, you might need to call .eval() on the layers involved for “task1”. 
This will make sure to disable dropout and use the running stats of batchnorm layers. 
If you keep the model in train() mode, the batchnorm stats will be updated and might thus c…