I would do something like:
` from clearml import Logger
def forward(...):
self.iteration += 1
weights = self.compute_weights(...)
m = (weights * (target-preds)).mean()
Logger.current_logger().report_scalar(title="debug", series="mean_weight", value=m, iteration=self.iteration)
return m `
Awesome AgitatedDove14 Thanks a lot 🙌
GrievingTurkey78 I'm not sure I follow, are you asking how to add additional scalars ?
AgitatedDove14 Well I have a loss function which is something like:class MyLoss(...): def forward(...): weights = self.compute_weights(...) return (weights * (target-preds)).mean()
There seems to be a problem on certain batch when computing the weights. What would be the best way to log the batch that causes the problem, along with the weights being computed.