Closed david658 closed 4 years ago
It's hard to debug this sort of thing.
Could you try running the following, which uses the example inputs:
python neural_style.py --content examples/1-content.jpg --styles examples/1-style.jpg --output new.png --iterations 1000 --overwrite
Thank you for your prompt reply. I 'm trying your command and will upload the new results after 6 hour running on my laptop. By the way, I have no GPU installed on my laptop, so I install tensorflow 1.14.0, rather than tensorflow-gpu 1.14.0. Can this cause problem?
No that shouldn’t cause problems
On Oct 10, 2019, at 5:42 PM, david658 notifications@github.com wrote:
Thank you for your prompt reply. I 'm trying your command and will upload the new results after 6 hour running on my laptop. By the way, I have no GPU installed on my laptop, so I install tensorflow 1.14.0, rather than tensorflow-gpu 1.14.0. Can this cause problem?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
I have run with your command, and got some error
content loss: 2.15407e+06
style loss: 5.86155e+07
tv loss: nan
total loss: nan
C:\CV\NST_MIT\stylize.py:202: RuntimeWarning: invalid value encountered in less
if this_loss < best_loss:
Traceback (most recent call last):
File "neural_style.py", line 289, in
The output new.png is empty
My system is Anaconda 3 (Python3.7.3) on Windows 8.1.
The nan
losses look suspicious. I'm not sure why you're getting those. Are you using the latest version of the code?
I get the following output:
content loss: 760838
style loss: 257111
tv loss: 54628.2
total loss: 1.07258e+06
And it produces the following:
Yes, I downloaded your programs two weeks ago, so they should be the latest version. The MD5 number of the vgg I used is 8ee3263992981a1d26e73b3ca028a123. Is this version ok to run your program?
Oh maybe that's the issue? I don't remember which old versions work, but the current recommended version has MD5 hash 106118b7cf60435e6d8e04f6a6dc3657
(see https://github.com/anishathalye/neural-style#data-files).
Thank you for your help and advice. I have updated VGG 19, but still can not get right results. Then I downgraded Python from 3.7 to 3.5, and Tensorflow from 1.14 to 1.9. It finally worked! Now the output image looks Thanks again for your kind help.
Oh that's interesting… Glad you got it working!
I will leave this issue open till I can test with those specific TF versions to see if there's an incompatibility. Thanks for the detailed error reports.
I tried it on my own machine with TensorFlow 1.14, and it seems to work. Not sure why it didn't on your machine.
Dear friends,
Recently I have tested the program on my notebook but got strange results. The output file contains just random distributed dots, neither content nor style appear as in the input files. After installing Pillow, Scipy 1.1.0 and tensorflow 1.14.0 (not tensorflow-gpu), and checking
Then I ran the following command in anaconda prompt: python neuralstyle.py --content ./content/1-content.jpg --styles ./style/1-style.jpg --output ./output/output.jpg --checkpoint-output ./output/test%d.jpg --checkpoint-iterations 100 --overwrite. The program goes through with no fatal errors, but the output image seems to be not right.
Could anyone please kindly tell me what is wrong with my practice?
Many thanks,
David