PyTorch 1.2.0 changed the weight init behavior of BatchNorm2d in Python (with reasons documented in https://github.com/pytorch/pytorch/issues/12259 11). BatchNorm2d in libtorch is mirroring how BatchNorm2d in Python behaves currently.