Stochastic Pooling and Stochastic Dropout

Can someone give an example on how can we implement Stochastic Pooling and Stochastic Dropout in Pytorch.

References:


http://mipal.snu.ac.kr/images/1/16/Dropout_ACCV2016.pdf

Have you started an implementation already and got stuck at some point?

Not yet.
I don’t have clue on how to approach.
Can you suggest something?