Lesson 4, multi-label classification

Hi,

I worked my way through the lesson notebook.
Subsequently I am trying to create a notebook for multi-label classification.
I am using datasets.ClassLabel to cast my labels.

However when training the trainer I get:
“Value Error: all the input dimensions for the concatenation axis must match exactly, but along dimension 1, the array at index 0 has size 6 and the array at index 1 has size 978”
Did anybody run into this issue?
What am I missing?

Or do you know any example notebooks to train using a custom dataset for multi-label classification?

thanks
Norbert

Hi Norbert,

if you have questions like this, I would in your place also post the code that caused it, otherwise it is rather unlikely that the correct error can be found easily.

As an example for multi-label classification, I recommend Lesson 3 - Multi-Label Classification | walkwithfastai by Zachary Mueller (pretty much walkwithfastai is a go-to for me if I need soemthing).

1 Like

Hi Wolfgang,

thanks for bringing up walkwithfastai. That seems to be a great source for info.
For now I turned to the Huggingface course because the basic transformer idea of re-using pre-trained models makes a lot of sense to me.

cheers
Norbert