Search code examples
tensorboard

TensorFlow - printing with floating point precision


How do you increase the floating point precision representation of tensorflow variables? I need this cause my network is large and data is complex, so I want to see any amount of improvement no matter how small. When I iterate through the training I occasionally print the mean error to the screen, and all I see is the same 6 digits - it works fine with less complex inputs. Note that tensorboard seems to have similar precision, I would be happy enough with a more precise tensorboard graph.

msquaredError=m_sqerror.eval(sessions=sess,feed_dict={input:ip, output=op,keep_prob:1.0})
print ("MSE: %9f"%msquaredError)

output:

MSE: 0.317513

desired output:

MSE: 0.317513223 ... and many more digits


Solution

  • Stoopid error.

    print ("MSE: %9f"%msquaredError)
    

    should be

    print ("MSE: %.9f"%msquaredError)