Solved by Diego in post #4 
              
              
                If anyone else is having a simillar issue I solved it by changing the dropout layers from: F.dropout(x, 0.5) to  F.dropout(x, 0.5, self.training) in the above code. The problem is now solved but I still don’t know why the bahviour of F.dropout() changes from 0.4.1 to 1.0.