Gradients in deepdream

153 Views Asked by At

I'm trying to implement deepdream in theano. As far as I understood I need to choose a layer in a pre-trained neural network to be the objective , then I need to set the activation functions of that layer to be equal to gradients, then backpropagate to the input image and finally apply the changes. I'm new to theano and I can't think of how to implement it, how can I set the layer's values to be equal to gradients and backpropagate back to image? Is it possible to do in a couple of lines in theano? Also if my understanding is wrong, please correct me.

0

There are 0 best solutions below