About https://github.com/sjchoi86/Tensorflow-101/blob/master/notebooks/mlp_mnist_simple.ipynb Recently updated Tensorflow (1.4) will make the following error. ValueError: Only call softmax_cross_entropy_with_logits with named arguments (labels=..., logits=..., ...) Just simply adding named arguments will solve this issue. cost = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits =pred, labels=y)) FYI, http://www.edwith.org/deeplearningchoi/lecture/15552/ has the right code.