Exactly, what PyTorch does is to account for scaling at training time (multiplies the weights at training time by 1/(1-p_drop) and leaves weights untouched at test time).
It means that if I add dropout layers in between in my trained model and at test time I apply dropout as in train mode, PyTorch directly scales correctly the weights to account for missing nodes.
Now, my intuition is that the results are worse than what I expected because network weights were not trained to be “robust”, because dropout layers were not present during training. Hence, since by adding dropout at test time I get bad predictions, this means that my model is extremely uncertain about its predictions (I am using Monte Carlo dropout to estimate uncertainty).
I don’t know if you are familiar with this technique, in case do you think that my deduction is correct?
Thanks for your help