Tensorflow-Tutorial
Tensorflow-Tutorial copied to clipboard
another way to compute accuray on 402_RNN_classification.py
I get high accuracy score on this way : isCorrect = tf.equal(tf.argmax(predict_Y, 1), tf.argmax(Y_holder, 1)) accuracy = tf.reduce_mean(tf.cast(isCorrect, tf.float32)) your code: accuracy = tf.metrics.accuracy( # return (acc, update_op), and create 2 local variables labels=tf.argmax(tf_y, axis=1), predictions=tf.argmax(output, axis=1),)[1] I think 2 way is same, but get different result, can you tell me the reason?
Can you fix the random seed and test the result again?
Fix random seed by set:
tf.set_random_seed(1)
np.random.seed(1)