model_eval bug fix, wrongly use of tf.argmax
@@ -207,7 +207,8 @@ def model_eval(sess, x, y, model, X_test, Y_test, args=None):
assert args.batch_size, "Batch size was not given in args dict"
# Define accuracy symbolically
- correct_preds = tf.equal(tf.argmax(y, axis=-1), tf.argmax(model, axis=-1))
+ correct_preds = tf.equal(tf.argmax(y, axis=tf.rank(y) - 1),
+ tf.argmax(model, axis=tf.rank(model) - 1))
acc_value = tf.reduce_mean(tf.to_float(correct_preds))
# Init result var
