I’m in trouble when trying to calculate loss from output.logits from LayoutLMv3 Huggingface. I acctually know that I could access the loss from output.loss. However, I’m trying to customize training process so I want to calculate by meself but the way I use seems incorrect.
Please help me.

Hope you could help me a function in Python that calculate the loss

New contributor

Hung Tran is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.