Actually it dosent matter whether you place self.dropout in evaluation or not. PyTorch uses inverted dropout, so the scaling is done at training time only, so that during evaluation time nothing needs to be scaled.