Why there's not a single metric in pytorch?

I’ve been curious for over a year, why not a single metric is available in Pytorch? I’ve got no problem with defining one from scratch and keep copying and pasting it to every project, but wouldn’t it be a bit nicer if we have some.
At least some basic ones like accuracy, topk accuracy, categorical accuracy… etc. Like we have in Tensorflow, for its api consisteny I can give full marks to tensorflow.
I’m just wondering is there any good reason for not to have any?

You could convert your tensors into numpy arrays and use scikit learn’s metric functions. That should be pretty straight forward. However, we could actually try writing native metric functions in pytorch.

Thanks for pointing it out, I never thought of that.

You should check also the Ignite library from Pytorch, you will love it :wink:
Ignite library

1 Like

I’ve seen it, loved it for sure, then moved to pytorch lightning loved it for sure as well, found some pitfalls, especially when training a multi model system like gan, so now I’m developing my own wrapper, and by using it I’ve never been this much productive!! I’m loving what I’ve built. May be I’ll share more about it later.