Tabular: Regression prediction phase returns 2 tensors

I would expect learn.get_preds() to return a single tensor of len(validation) but instead it returns 2 tensors of len(validation)

I did check my data.c and it’s =1 so I’m a little lost.

I did pass a test set so is it possible one is the preds for the validation the other is for test ?

One other thing worth noting is the documentation link to the source code for Learner.get_preds() points to Learner.pred_batch() instead of get_preds() which isn’t that big of a deal since get_preds is right below it.

1 Like

Do you have any additional metrics except for the loss (e.g. accuracy)?
From the docs of validation:
“Calculate loss and metrics for a batch, call out to callbacks as necessary.”

The objective is F.mse_loss and I have metric = exp_rmspe. No additional metrics though.

learn.get_preds returns output, target, so it’s logical you get two tensors.

1 Like