A VGG-based perceptual loss function for PyTorch. See Johnson, Alahi, and Fei-Fei, "Perceptual Losses for Real-Time Style Transfer and Super-Resolution".
The module containing the code to import is vgg_loss.py
. See the three demos for usage examples.