TextClasDataBunch + Multi labels

Hi,

I’ve been trying to create a multi labels classifier from a dataframe and although I tried to look at similar topics on the forum and in the docs, I’ve had no luck for now. I keep having a

IndexError: positional indexers are out-of-bounds

Here is my code:

Any idea how to solve this problem? I feel like it’s very dumb but I just can’t do it.

Thanks!
Nicolas

PS: I work with Pytorch v1 and fastai v1

one hot encoding is not currently supported. See Multilabel classification with ULMFiT in Fastai v1

Oh all right! I saw this topic but I didn’t understand that a list of tags would work. I am going to try that. Thanks for your answer. :slight_smile:

Note that support for one-hot encoded labels was just added in master, so now it should work.

Great! Behind the scenes, is the training different whether we use a list of tags or a one-hot encoding?

Nope, it ends up the same.

1 Like