Okay I think I understand, so it doesn’t matter whether you use one-hot encoding or indexing because the optimizer will simply minimise the loss between the target and resulting class regardless of formatting of class labels because it will be the same format for both input and output?
My question was really trying to understand whether I have my thoughts right on the following:
I’m trying to classify images as either ‘cat’ or 'dog. Therefore in my mind, if I return two outputs of the final fully connected layer, this is essentially one-hot encoding where one of the two values represents ‘dog’ and the other ‘cat’.
If I used one output instead of two in that final fully connected layer, I would expect it to push the ‘dog’ class to say 0 and ‘cat’ to 1 or vice versa.
Maybe this thinking is completely wrong though!