April 2020
Intermediate to advanced
438 pages
12h 2m
English
We can now denoise using the denoising autoencoder in the following steps:
def to_img(x): x = x.view(x.size(0), 1, 50, 37) return xdef plot_sample_img(img, name): img = img.view(1, 50, 37) save_image(img, './sample_{}.png'.format(name))
def add_noise(img): noise = torch.randn(img.size()) * 0.2 noisy_img = img + noise return noisy_img
Read now
Unlock full access