Hi Ritesh!



 ritesh313:

is there any other way to get integer labels as model output?


If by “model output” you mean the model predictions that you feed
in to your loss function, then you don’t want to do this.  If you do
manage to have your model output values that are exactly integers
(even if they are encoded as floating-point numbers) those outputs
won’t be usefully differentiable so your model won’t train.


(and then I use softmax and get the label prediction through maximum index).


As an aside, you don’t need the softmax() before the “maximum
index” (argmax()) to get the label prediction.  softmax() doesn’t
change the order of its arguments, so you can leave it out.
Best.
K. Frank