The loss function seems to be correctly evaluated, you can get some hints on how it is done in the documentation. It would work perfectly fine even if the target probabilities were not one-hot encoded.
I’m not sure what you meant by the BCELoss scales the input, I guess the right answer is no.



 raul:

Also , x tensor is ranging for all sort of values.Do i need to scale it before feeding into the the model network ?


Yes, it is advisable to normalize your data before training, it provides numerical stability to the optimization step.