求分类问题的精确率accuracy 采用 tf.reduce_mean tf.cast tf.equal
importtensorflowastfA=[1,3,4,5,6]B=[1,3,4,3,2]correct_prediction=tf.equal(A,B)withtf.Session()assess:#print(sess.run(tf.equal(A,B)))print(sess.run(tf.equal(A,B)))print(sess.run(tf.cast(correct_predict