Please do first (on your own): https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html

Then, get invertible.ipynb and scattering.ipynb.

If you're fast enough, try https://pytorch.org/tutorials/advanced/neural_style_tutorial.html and change the layers used for style transfer.



kernel = self.conv.weight.data
kernel_fft = fft(kernel,dim=2)
abs_kernel_fft = torch.abs(kernel_fft)
renorm_abs_kernel_fft=abs_kernel_fft
renorm_abs_kernel_fft[abs_kernel_fft<0.9] = 1
renorm_abs_kernel_fft[abs_kernel_fft>=0.9] *= 1/0.9
kernel_ = ifft(kernel_fft/renorm_abs_kernel_fft,dim=2)
self.conv.weight.data.copy_(kernel_.real)