Let’s say I wanna build a custom metric, so in that case, I could just simply just write a function and use accordingly in my training loop.
Can I rather define metric as a class inherited from nn.Module and there define the forward method for the metric definition?
I know I can, but is it beneficial in any way (if it is) or just a function definition is fine.