The optimizer tried to minimize the loss.
It doesn’t depend on using one-hot encoding or an index target. The loss will be the same.
The one-hot targets will be used as an index, so that we can save this transformation and directly feed the index vector.
What do you exactly mean by “pushing the output result to one value rather than using two” ?