How to encode y to classnames?

I think I found one solution here:

learn.dls.vocab returns a list of the class labels. My best guess is that the index refers to the class label, i.e. for ['cat', 'dog'] it would be 0 = cat, 1 = dog

1 Like