Distillation loss monitoring in LwF #1005
Replies: 2 comments 3 replies
-
Hi @PabloMese, mmh.. yeah it seems to be a little tricky to monitor that easily at the moment (@AndreaCossu, @AntonioCarta correct me if I'm wrong). The cleanest option would be to create your version of the lwf plugin and save in the strategy object an additional attribute "penalty", then implement a custom metric similar to the loss one to monitor that. This way you'd get for free all the logging as for the other metrics. A quick hack may be to just add a line here and save the penalty someplace else before it gets summed into the main loss. In the future we may think of smarter ways to add watchers to user-defined state variables. thanks for opening the issue, hope it helps! |
Beta Was this translation helpful? Give feedback.
-
The plugin doesn't save the metric, but you can easily do it yourself by subclassing lwf and adding the code to send the values to the EvaluationPlugin (not tested):
This is going to send the value automatically to your loggers. we may add this in the future. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, everyone
Do you know if it is possible to monitor the distillation loss in LwF during training? I have already seen how the LwFPLugin calculates it with the 'penalty' method and sums it accordingly to the 'standard' loss function for the classification metric. However, the loss captured by the evaluation plugin is the total loss but I also want to record them separated. Is there any option to do this?
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions