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

errors with loss #12

Closed
jiao0805 opened this issue Mar 13, 2017 · 1 comment
Closed

errors with loss #12

jiao0805 opened this issue Mar 13, 2017 · 1 comment

Comments

@jiao0805
Copy link

I use tensorflow 1.0 gpu on windows and I got error:

Traceback (most recent call last):
File "FCN.py", line 221, in
tf.app.run()
File "C:\Users\SEELE\AppData\Local\Programs\Python\Python35\lib\site-packages
tensorflow\python\platform\app.py", line 44, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "FCN.py", line 152, in main
loss = tf.reduce_mean((tf.nn.sparse_softmax_cross_entropy_with_logits(logits
,tf.squeeze(annotation, squeeze_dims=[3]),name="entropy")))
File "C:\Users\SEELE\AppData\Local\Programs\Python\Python35\lib\site-packages
tensorflow\python\ops\nn_ops.py", line 1684, in sparse_softmax_cross_entropy_wit
h_logits
labels, logits)
File "C:\Users\SEELE\AppData\Local\Programs\Python\Python35\lib\site-packages
tensorflow\python\ops\nn_ops.py", line 1533, in _ensure_xent_args
"named arguments (labels=..., logits=..., ...)" % name)
ValueError: Only call sparse_softmax_cross_entropy_with_logits with named argu
ments (labels=..., logits=..., ...)

How can I solve it?

@shekkizh
Copy link
Owner

The solution is suggested under Issue #9
Thanks to @jiao0805 and @FKNoble.

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