joeylitalien / noise2noise-pytorch

PyTorch Implementation of Noise2Noise (Lehtinen et al., 2018)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About U-Net model and data pre-processing

Shakarim94 opened this issue · comments

I am curious about the differences from the paper model

  1. Why did you choose to use ConvTranspose instead of Upsampling
  2. You used RELU in all parts and Leaky RELU after the last layer. But from the paper I think the author meant Leaky RELU everywhere except the last layer. And In the last layer only linear activation

Unrelated question
3) Did you use any pre-processing for the images e.g. means subtraction, normalization etc. I think that would be needed since we don't have BN layers

I am trying to implement the model in Tensorflow and having the problem of INF loss that starts in the 2nd epoch. So I hope your answers would help me. Thank you in advance!

Update: I seem to have solved the problem by adding Batch Norm layers to the UNET model. But still I am puzzled how the authors managed to get a stable training without Batch Norm

Hi Shakarim,

  1. Upsampling works just as well as ConvTranspose. Use the one you like.
  2. You might be right for this. The phrasing in the paper is kind of confusing. Seems to work okay with the current setup, but that might just solve the problem I had with Monte Carlo denoised output and tonemapping.
  3. I am not doing anything to the images beside cropping them. No normalization is done to the images, and no batch norm is used (as written in the paper). This part was also weird to me; it doesn't hurt to use BN in this case.

I'm gonna mark this as closed, but feel free to open a new ticket if you find something else that feels off.

From this official release https://github.com/NVlabs/noise2noise/blob/master/network.py
Probably Shakarim94 is right.
I've trained on imagenet val set and could not get 32dB on Kodak
Maybe this modification would help