How do I set weights of the batch normalization layer of pytorch?

How to initialize the parameter of BatchNorm2d in pytorch? I mean mean, variance, gamma and beta. Actually I have a pretrained model in keras with tensorflow backend. Another thing which I want to mention that is the size of weight of each learnable parameter:

mean = (64,)
variance = (64,)
gamma = (64,)
beta = (64,)

Appreciating in advance for any response!

2 Likes
mean = self.running_mean
variance = self.running_var
gamma = self.weight
beta = self.bias
6 Likes