rstudio / keras3

R Interface to Keras
https://keras3.posit.co/
Other
833 stars 282 forks source link

Problem with deep_dream.R example #397

Closed patwa67 closed 6 years ago

patwa67 commented 6 years ago

What's the point of the deep_dream.R example? It just prints the same picture five times, and the same loss.

dfalbel commented 6 years ago

I'll take a look, but it should output images like this: https://ai.googleblog.com/2015/06/inceptionism-going-deeper-into-neural.html

dfalbel commented 6 years ago

This seems related to this line:

grads <- grads / k_maximum(k_mean(k_abs(grads)), k_epsilon())

It seems to work when removing it.

@javierluraschi Is there any special reason for normalizing the gradients here?

dfalbel commented 6 years ago

@patwa67 should be fixed now. https://keras.rstudio.com/articles/examples/deep_dream.html