[Solved] Error while using simple print in Python [closed]


It’s a Python indentation issue.
The start of your print line must have the same indentation as the start of the train_accuracy line.

Something like this:

  if i%10 == 0:
     train_accuracy = sess.run( accuracy, feed_dict={
        x:batch[0], y_: batch[1], keep_prob: 1.0})
     print("step %d, training accuracy %g"%(i, train_accuracy))

solved Error while using simple print in Python [closed]