I\'m training a CNN quite similar to the one in this example, for image segmentation. The images are 1500x1500x1, and labels are of the same size.
After defining the
Where you use loss = sess.run(loss), you redefine in python the variable loss.
The first time it will run fine. The second time, you will try to do:
sess.run(1.4415792e+2)
Because loss is now a float. 
You should use different names like:
loss_val, acc = sess.run([loss, accuracy], feed_dict={x: batch_x, y: batch_y, keep_prob: 1.})