Skip to content

sar-gupta/deep-dream-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deep-dream-pytorch

Pytorch implementation of DeepDream on VGG16 Network

Understanding the code

The code consists of mainly two functions:

  1. deep_dream_vgg : This is a recursive function. It is used to create octaves, and to merge (or blend) the image generated by a recursive call with the image at one (recursive) level higher.

  2. dd_helper : This is the actual code for deep dream. The gradients at a particular layer are set equal to the activation of that layer. This results in the maximization of the activations at that particular layer. In other words, we are enhancing the features detected by a layer. Gradient ascent is applied to the input images (i.e. octaves).

Requirements

  • pytorch
  • torchvision
  • PIL
  • numpy
  • matplotlib

Note : In case you don't have a GPU, remove all instances of .cuda() from the code.

Running locally

  • Clone this repository
  • Change into this directory cd deep-dream-pytorch
  • Run a jupyter notebook

References

  1. https://research.googleblog.com/2015/06/inceptionism-going-deeper-into-neural.html
  2. https://www.youtube.com/watch?v=ws-ZbiFV1Ms
  3. https://github.com/google/deepdream

Releases

No releases published

Packages

No packages published