This is a great project you did and thanks for sharing. I ran into the following error when running your notebook. Could you help? Thank in advance!
ValueError Traceback (most recent call last)
in ()
22 # Define the loss function.
23 # Cross-entropy is a good choice for classification.
---> 24 loss = tf.reduce_mean(tf.nn.sparse_softmax_cross_entropy_with_logits(logits, labels_ph))
25
26 # Create training op.
/usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/nn_ops.py in sparse_softmax_cross_entropy_with_logits(_sentinel, labels, logits, name)
1711 """
1712 _ensure_xent_args("sparse_softmax_cross_entropy_with_logits", _sentinel,
-> 1713 labels, logits)
1714
1715 # TODO(pcmurray) Raise an error when the label is not an index in
/usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/nn_ops.py in _ensure_xent_args(name, sentinel, labels, logits)
1560 if sentinel is not None:
1561 raise ValueError("Only call `%s` with "
-> 1562 "named arguments (labels=..., logits=..., ...)" % name)
1563 if labels is None or logits is None:
1564 raise ValueError("Both labels and logits must be provided.")
ValueError: Only call `sparse_softmax_cross_entropy_with_logits` with named arguments (labels=..., logits=..., ...)
This is a great project you did and thanks for sharing. I ran into the following error when running your notebook. Could you help? Thank in advance!
ValueError Traceback (most recent call last)