Solved by spanev in post #3 
              
              
                You could also do: 
net = net.eval()
for m in net.modules():               
    if 'Dropout' in str(type(m)):     
        m.train()