Good to hear it’s working!
However, let’s check the last error message as I have the feeling there might be a silent bug.
The RuntimeError states that your target contains invalid values, i.e. it should contain values in the range [0, n_classes-1].
Basically your target tensor contains the class indices for all samples, not probabilities!
How did you normalize the target to get the probabilities?
Based on the output shape of your model is looks like you are dealing with three classes.
The target tensor should thus contain long values in [0, 2].