You could  use the functional interface, which lets you specify gamma and beta directly, or you could just delete the beta parameter from a batchnorm2d module and replace it with "my_batchnorm_module.register_parameter(‘bias’,None). Or you could subclass batchnorm2d and just change either the constructor or the forward method.