How to combine multiple criterions to a loss function?

Thank you. That helped a lot.

I know I can batch this criterion. But iI’m doing it to understand how PyTorch works.
And this explained a lot to me. So thank you very much