I was following this basic TensorFlow Image Classification problem, where images of flowers have to be classified into one of 5 possible classes. The labels in the training set are not one-hot encoded, and are individual numbers: 1,2,3,4 or 5 (corresponding to 5 classes). The final layer of the ConvNet however has num_class
number of units.
Wouldn't there be a dimension mismatch while computing the loss, since you are finding the difference between a [num_class, 1]
(predicted label) dimensioned vector and a [1, 1]
(true label) dimensioned vector?
Does the Keras backend automatically convert the labels into one-hot vectors?
Thank you in advance!