Hi all,
I want to play a bit with Monte Carlo dropout 20. However I am using ResNets (yes, I know that they don’t use dropout but added it). The problem is that ResNets also use batch normalization.
Now during the inference stage, I need to do multiple forward steps for each image and average results, while keeping dropout in train mode. At the same time, because batch norm behaves differently during train and eval mode, I need to turn it off. Simply doing:
net = net.eval()

obviously doesn’t work and sets both dropout and batch norm in eval mode.
Any solutions (I guess it is something relatively straightforward)?