pkmital / CADL

ARCHIVED: Contains historical course materials/Homework materials for the FREE MOOC course on "Creative Applications of Deep Learning w/ Tensorflow" #CADL
https://www.kadenze.com/courses/creative-applications-of-deep-learning-with-tensorflow/info
Apache License 2.0
1.48k stars 732 forks source link

Lecture 5: ValueError: Only call `sparse_softmax_cross_entropy_with_logits` with named arguments (labels=..., logits=..., ...) #90

Open bordakov opened 6 years ago

bordakov commented 6 years ago

In lecture 5 loss = tf.nn.sparse_softmax_cross_entropy_with_logits(logits, Y_true_flat) raises ValueError while loss = tf.nn.sparse_softmax_cross_entropy_with_logits(logits = logits, labels = Y_true_flat) seems to work see https://www.kadenze.com/forums/creative-applications-of-deep-learning-with-tensorflow-sessions-session-5-generative-models/threads/valueerror-only-call-sparse_softmax_cross_entropy_with_logits-with-named-arguments-labels-logits