Get_preds on Test Set only returns zero as labels

I trained my tabular learner with a databunch like this :

Now when I call get_preds on my test set, the labels are all zeros. Also I’m positive they are not supposed to be zeros and my model has ~88% accuracy.

Note : My Databunch stuck a label on my test set by itself. Is that why it’s not working?

Thanks a bunch (:

I am also experiencing this. Does anyone have any insight?

You just need to get the argmax from the tensor.
Do this:

predictions, *_ = learner.get_preds(ds_type=DatasetType.Test)
labels = np.argmax(predictions, 1)
1 Like