How can I add gaussian kernel to my input datasets

I’m trying to apply image denoising through GAN.
First I downsampled my images and then added noise using torch.randn.
Is there any problem with this method? I trained the net and surely it didn’t work.
I visualized my input data before feeding in, and I found that there are too much noise going in the input dataset. How can I solve this problem?? Any advice would be fine. Thanks.

low_real is the downsampling process and high_real is just the origin dataset with normalization :slight_smile:

You could scale your noise with a standard deviation smaller than 1 to add less noise:

std = 0.1
noise = torch.randn(opt.batchsize, 3, opt.imagesize, opt.imagesize) * std
1 Like