Open MyraBaba opened 7 years ago
Hi!
Change the whole line with this line :
digits_loss = tf.nn.softmax_cross_entropy_with_logits( logits=tf.reshape(y[:, 1:], [-1, len(common.CHARS)]), labels=tf.reshape(y_[:, 1:], [-1, len(common.CHARS)]))
@MansourTrabelsi Not really working.
@ranju2015 could you share more details? I encountered 2 locations with similar error (sigmoid_cross_entropy_with_logits and softmax_cross_entropy_with_logits), and after fixing as @MansourTrabelsi said, it worked.
I have :
Traceback (most recent call last): File "/Users/alpullu/Downloads/deep-anpr/train.py", line 266, in
initial_weights=initial_weights)
File "/Users/alpullu/Downloads/deep-anpr/train.py", line 174, in train
digits_loss, presence_loss, loss = getloss(y, y)
File "/Users/alpullu/Downloads/deep-anpr/train.py", line 132, in get_loss
[-1, len(common.CHARS)]))
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/ops/nn_ops.py", line 1558, in softmax_cross_entropy_with_logits
labels, logits)
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/ops/nn_ops.py", line 1512, in _ensure_xent_args
"named arguments (labels=..., logits=..., ...)" % name)
ValueError: Only call
softmax_cross_entropy_with_logits
with named arguments (labels=..., logits=..., ...)my tensorflow version : 1.3