This is a minimalistic Pytorch implementation of style transfer by Gatys Et al. Meant to be run in google colab, though you can turn the COLAB flag off if running locally.
The idea is to retain a given image's 'content' while rendering it in the 'style' of another image. This is best explained by the diagram below:
A timelapse of style being transferred
Style transfer requires the convolutional features of a standard classfier (most commonly VGG19, same as the one used here). This code can serve as a good example of getting these by using 'backward hooks'.