Can torchmetrics Metrics class be used as loss function? #831
-
Since PyTorch does not have a built-in Tweedie loss module, I am trying to use |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
if the particular metrics are differential, I guess so but have not tried yet... |
Beta Was this translation helpful? Give feedback.
-
I just moved this discussion to the correct repository :) @Borda is right, if the metric is differentiable w.r.t it's input this is not an issue. You can check this on our class interface by the |
Beta Was this translation helpful? Give feedback.
-
Hi @justusschock, What about the functional API? For example is |
Beta Was this translation helpful? Give feedback.
I just moved this discussion to the correct repository :)
@Borda is right, if the metric is differentiable w.r.t it's input this is not an issue. You can check this on our class interface by the
is_differentiable
property. For your currently used metric (TweedieDeviance
) this holds as you can see here