tensorflow-mnist-VAE
tensorflow-mnist-VAE copied to clipboard
ADD_NOISE
Hi,
In run_main, in the section "if ADD_NOISE:", the code states: if ADD_NOISE: x_PMLR = x_PMLR * np.random.randint(2, size=x_PMLR.shape) x_PMLR += np.random.randint(2, size=x_PMLR.shape)
Line 1 creates pepper noise (since you are multiplying by 1 or 0). The second line adds 1 or 0 to each pixel. What is the rationale? Why not simply add a Gaussian or uniform noise of small amplitude to each pixel? Thanks.
Hi,
Two lines you mentioned is meant to add "strong" noise to image so that you can hardly recognize digits in input image with noise.
I just wanted to show strong denoising performance of VAE.
You are allowed to add any types of noise like gaussian or uniform. There is no rationale.