If the target tensor is corresponding to the train_labels of CIFAR10, you would be working on a multi-class classification and the model output is wrong and should have the shape [batch_size, nb_classes=10].