For BatchNormalization, there are certain parameters (means and variance) that are learned during training. These parameters are sued to scale/shift the hidden layers to have zero mean and unit variance, to eliminating the internal covariance shift.
Now, by changing the mode to .eval() you basically disable the learning process of those parameters during training of you network. As a result, at the testing phase, your network has poor estimates of these means and variances and therefore, will scale/shift poorly.
So, in summary, if you don’t need the Dropout and BatchNorm just remove them from you model. Changing the mode to .eval() may result in unexpected behaviour.