Converting model from Keras to Pytorch (Problem with BatchNorm)

Hi, I am trying to convert pix2pix GAN network from keras to pytorch. I would like to convert Keras BatchNorm layer to Pytorch BatchNorm2d, because i think that the reason why my discriminator loss is falling faster than in keras.

This is original Keras implementation: BatchNormalization(momentum=0.8) and I also would like to set up init weight and bias as it is in Keras.

Thanks for help.


The batchnorm in pytorch takes a momentum parameter as well so you can do the same thing (doc here).
For the initialization, you can initialize the .weight and .bias of the batchnorm as you want.

this one is clear for me, but i am not sure about the others, which are set as default in keras version