OK so I think the problem was that
names = [learner.dls.vocab[p] for p in preds_class]
should be
names = [learner.dls.vocab[1][p] for p in preds_class]
learner.dls.vocab[1]
is a category map with the categories in it.
Thanks for the help.
OK so I think the problem was that
names = [learner.dls.vocab[p] for p in preds_class]
should be
names = [learner.dls.vocab[1][p] for p in preds_class]
learner.dls.vocab[1]
is a category map with the categories in it.
Thanks for the help.