Logging Multi-Label Metrics #12121
-
Hey, I was wondering if there was a correct way to evaluate and log multi-class metrics at the end of an epoch, such that the metrics could be evaluated across multiple GPUs using ddp? Typically, if I was looking at a image classification problem I could use the following:
I could log the either with single GPU or multi-GPU accuracy using:
However, if I try modifying the accuracy metric to use multi-label accuracy using:
I find that the metric is logged as nan, which is I'm guessing due to the tensor which contains the class wide accuracies not updating between batches. I've also tried to get around this I ended up passing |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
As an update, I managed to develop a work around by iterating over the tensor that contained multi-label metrics that are evaluated on a class level. I.e, this function coulds do it
Where the metrics are evaluated on a class wise level using.
and the logging function can be placed within the training or validation step using
|
Beta Was this translation helpful? Give feedback.
As an update, I managed to develop a work around by iterating over the tensor that contained multi-label metrics that are evaluated on a class level. I.e, this function coulds do it
Wher…