I am trying to use the different metrics proposed by Fastai v2 for multi label classification (https://dev.fast.ai/metrics#Multi-label-classification)
The only metric I can use successfully is accuracy_multi
learner = cnn_learner(dls, arch, metrics=[partial(accuracy_multi)])
Unfortunately, all the other metrics do not work.
learner = cnn_learner(dls, arch, metrics=[partial(FBetaMulti)])
will give me the following error when calling fine_tune()
TypeError Traceback (most recent call last)
----> 1 learner.fine_tune(1, 3e-3)
/usr/local/lib/python3.6/dist-packages/fastai2/learner.py in accumulate(self, learn)
335 def accumulate(self, learn):
–> 337 bs = find_bs(learn.yb)
338 self.total += to_detach(self.func(learn.pred, *learn.yb))*bs
339 self.count += bs
TypeError: unsupported operand type(s) for *: ‘AccumMetric’ and ‘int’
Would you have any idea what I am doing wrong or examples on how to use these metrics properly ?