I had this error as well. And I realized my mistake. If you have 10 classes, your label values should range between 0-9, inclusive. The error was reproduced on the TensorFlow CIFAR10 example, used with SVHN dataset. Refer to question and answer below.