How does the model output look compared to the target, if you reach the zero loss?
I haven’t checked the implementation carefully, but could you use a sample output and target to check the validity of the loss?