Explain different losses in a transformer.