The backward pass will be executed according to what Autograd collected during the forward pass, so the condition should be respected.
I’m not sure to understand your code completely, but it seems you are initializing self.bn and self.bn_aux with the same values? If so, switching the order wouldn’t make a difference?