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

Keras-Version: in Model-Definition DnCNN() the parameter use_bnorm is faulty? #53

Open mullanptr opened 5 years ago

mullanptr commented 5 years ago

Hello,

In the Keras Version, in main_train.py the function DnCNN (where the model is defined) has a parameter use_bnorm. What the name of the parameter implies to me, is that you can specify whether to use batch-normalization, or not.

However, that's not what it does. There will be a Layer for Batch-Normalization included, always. I assume this is just an indention error, with the if-clause above, isn't it? What it now does, is only affecting the layer counter...

mullanptr commented 5 years ago

Ahh sorry - maybe this can be closed again. Seems like I applied an auto-indention -- which messed up the original indention...

So yes the the use_bnorm can be used to include or exclude Batch-Normalization.

Only comment I have remaining is, that a small whitespace within the if-clause is present, which can mess up auto-indention...

zaccharieramzi commented 4 years ago

No I think you are right, the batch normalization used in the if clause governed by use_bnorm is commented out. The batch normalization is therefore always used, no matter the value of use_bnorm.