I'm getting an error when trying to run the following code:
correct = tf.equal(tf.argmax(activation,1), tf.argmax(y,1))
accuracy = tf.reduce_mean(tf.cast(correct,'float'))
print ('Accuracy: ', sess.run(accuracy, feed_dict = {x: test_x, yL test_y})
The actual error is:
tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected dimension in the range [-1, 1), but got 1
[[Node: ArgMax_1 = ArgMax[T=DT_FLOAT, Tidx=DT_INT32, output_type=DT_INT64, _device="/job:localhost/replica:0/task:0/cpu:0"](_arg_Placeholder_1_0_1, ArgMax_1/dimension)]]
The code is running a simple binary classification using logistic regression in TensorFlow.
I've been doing some research on the net but can't really find a satisfactory solution.
Thanks,