saba:

My labels are different float numbers from 0 to 100. I used the one-hot vector to convert each float labels to the one-hot vector and then as you said get “argmax” to have index for each label.
The maximum value from “argmax” can be 400.


If I understand your use case correctly you are working with 400 floating point “labels” in the range [0, 100], so e.g. 0.25 would be a valid label?
If that’s the case and you are indeed working with only 400 unique values, then your workflow should be correct and the embedding layer should at least have num_embeddings=400.