Could you explain, what exactly should be fixed a bit more?



 Valerio_Biscione:

In the past (before that commit), we could change the behaviour of BatchNorm after the module was created. That is, we could either run it in train mode (stats computed on the batch) or in eval mode (using running_*) depending on the value of .track_running_stats which could be changed even after module creation


This was indeed the case, but you could also use the same behavior by calling .train() and .eval() on the batchnorm layers.
I guess your use case might be a bit more special in a way, which used the “hack” of changing the track_running_stats attribute?