Ubospica opened a new pull request, #14668:
URL: https://github.com/apache/tvm/pull/14668
This PR adds two components to support the Relax training workflow: loss
function library and AppendLoss pass.
- Loss function library. A library that generates relax functions
representing common loss functions, such as MSELoss and CrossEntropyLoss.
- Generally, loss function will take one or more **input parameters**
(that is outputs of the backbone of a model), one or more **target
parameters**, and generate a scalar value denoting the loss.
- AppendLoss pass. You can specify one function (the backbone function) in
the IRModule, and one loss function (normally, generated by the loss function
library) to AppendLoss. It will attach the loss function to the backbone
function, and add the result function to the IRModule.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]