Thanks Nikhil.
I tried that before and now, and the error changed to
RuntimeError: The size of tensor a (50) must match the size of tensor b (12) at non-singleton dimension 2
I must be doing something silly/wrong but can’t figure what.
However using
F1_score = partial(fbeta,thresh=0.5, beta = 1)
works well, which I believe shoudn’t as it is for multilabel classification.
But
F1_macro = FBeta( beta=1)
or
F1_macro = FBeta(average='macro', beta=1)
doesn’t work.
I have read many post regarding
RuntimeError: The size of tensor a (50) must match the size of tensor b (12) at non-singleton dimension 2
but also couldn’t figure out what is really the problem since some people resolved it changing the bs (batch size) of the databunch.
I tried different bs values and that affected the first number on the error message.
There is something (or many things) I haven’t understood yet.