cszn / DnCNN

Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising (TIP, 2017)
https://cszn.github.io/
1.42k stars 534 forks source link

Discrepancy in the parameters used for batch normalisation between pytorch and keras #74

Open zaccharieramzi opened 4 years ago

zaccharieramzi commented 4 years ago

The parameters used for batch normalization are not specified in the original paper.

I don't know how batch norm works in Matlab (I have tried to read the codes but it's very difficult to me), so I tried looking in keras. The parameters used seemed very odd (in addition the batch normalisation is involved in a code mess), so I looked in pytorch, and saw that they are different. In keras the momentum is 0.0 or 0.1 depending on where you look, and in pytorch the momentum is 0.95.

Note that this differs from the original unofficial keras implementation.