Implementing DeepDream
DeepDream is the result of an experiment that aimed to visualize the internal patterns that are learned by a neural network. In order to achieve this goal, we can pass an image through the network, compute its gradient with respect to the activations of a specific layer, and then modify the image to increase the magnitude of such activations to, in turn, magnify the patterns. The result? Psychedelic, surreal photos!
Although this recipe is a bit complex due to the nature of DeepDream, we will take it one step at a time, so don't worry.
Let's get started.
Getting ready
We don't need to install anything extra for this recipe. However, we won't dive deep into the details of DeepDream, but if you're interested in the topic, you can read the original blog post by Google here: https://ai.googleblog.com/2015/06/inceptionism-going-deeper-into-neural.html.
How to do it…
Follow these steps and you'll have your own...