Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange error #7

Open
dovanchan opened this issue Apr 7, 2017 · 1 comment
Open

Strange error #7

dovanchan opened this issue Apr 7, 2017 · 1 comment

Comments

@dovanchan
Copy link

When I try to transfer a phoho with this command:
DOVANtekiMacBook-Pro:chainer-neural-style DOVAN$ time python src/run.py -c /Users/DOVAN/Desktop/model.png -s /Users/DOVAN/Desktop/111.png -o /Users/DOVAN/Desktop/chai/modelcat -g -1 --match_color_histogram

loading content image completed
/Users/DOVAN/deeprely/chainer-neural-style/src/util.py:113: RuntimeWarning: invalid value encountered in sqrt
b_sigma = v.dot(np.diag(d ** 0.5)).dot(v.T)
loading style image completed
loading neural network model completed
/Users/DOVAN/anaconda2/lib/python2.7/site-packages/chainer/functions/activation/relu.py:44: RuntimeWarning: invalid value encountered in greater
return utils.force_array(gy[0] * (x[0] > 0)),
epoch 100 done
losses:
content_4_2: nan
style_1_2 : nan
style_2_2 : nan
style_3_2 : nan
style_4_2 : nan
tv : nan
epoch 200 done
losses:
content_4_2: nan
style_1_2 : nan
style_2_2 : nan
style_3_2 : nan
style_4_2 : nan
tv : nan
epoch 300 done
losses:
content_4_2: nan
style_1_2 : nan
style_2_2 : nan
style_3_2 : nan
style_4_2 : nan
tv : nan

Why all of loss are nan ~;
It's a bug in --match_color_histogram ?
(without this match_color,everything is fine)

@dsanno
Copy link
Owner

dsanno commented Apr 7, 2017

It seems that gray scale image causes the problem.
I fixed it in aecabb6, and can you try again?
If the same problem occurs, please tell me your style image.
I think this problem depends on style image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants