0 votes
1 view
in Data Science by (13.1k points)

I'm not sure what this error means. This error occurs when I try to calculate acc:

acc = accuracy.eval(feed_dict = {x: batch_images, y: batch_labels, keep_prob: 1.0})

I've tried looking up solutions, but I couldn't find any online. Any ideas on what's causing my error?

Here's a  link to my full code.

1 Answer

0 votes
by (19.9k points)

The error is generated by the below source code:

OP_REQUIRES(context, axis >= 0 && axis < input_dims, errors::InvalidArgument("Expected dimension in the range [", -input_dims, ", ", input_dims, "), but got ", dim));

Here, axis should be less than input_dims, not less-than-or-equal.

[-1,1) in the error message shows that ‘[’ indicates an inclusive value such that -1 is valid and ‘)’ indicates an exclusive value.