Tensorflow NaN bug?

Actually, it turned out to be something stupid. I’m posting this in case anyone else would run into a similar error. cross_entropy = -tf.reduce_sum(y_*tf.log(y_conv)) is actually a horrible way of computing the cross-entropy. In some samples, certain classes could be excluded with certainty after a while, resulting in y_conv=0 for that sample. That’s normally not … Read more