anishathalye / neural-style

Neural style in TensorFlow! 🎨
https://anishathalye.com/an-ai-that-can-mimic-any-artist/
GNU General Public License v3.0
5.54k stars 1.52k forks source link

Vgg weights not normalized #140

Closed mukund109 closed 5 years ago

mukund109 commented 5 years ago

The vgg weights have not been scaled as described in Section 2 of the paper.

While this doesn't have an effect on the output, the style and content loss weights that I need to use to reproduce the results in the paper are different.

mukund109 commented 5 years ago

relu3_1

gpiosenka commented 5 years ago

I ran this but iteration times were very large= 1000 iterations would take 48 hours? I have an RTX 2070 GPU which runs pretty fast. Wonder if you might have an advise as to way these times are so long. Thanks

wandadars commented 5 years ago

@gpiosenka I have the same card. I utilize the Nvidia NGC docker container to run this code and I can run something like 4000 iterations in 5 minutes. I'm not sure why you are seeing such long runtimes for your hardware/software setup.

anishathalye commented 5 years ago

Yeah, the scaling is a bit different in the implementation here.

gpiosenka commented 5 years ago

I have run a lot of tensorflow and keras models on the GPU with very short run times so I do not know why this would be so slow even if was running on the cpu

anishathalye commented 5 years ago

I don't get what these comments have to do with the issue (vgg weights not being normalized).

In any case, it sounds like whatever you're doing is not actually using the GPU. Like @wandadars pointed out, it should run pretty fast. Are you feeding it gigantic images or something?