Calculation of loss for get_preds

I am trying to calculate the accuracy and loss for the test dataset. Since we dont have labels for our test dataset, what kind of loss does the “get_preds()” function return for the test dataset?


The test set is pseudolabels, eg everything is 1. So the ‘loss’ isn’t really a thing you just care about the predictions.

Do you have labels beforehand? If so there’s a different way to go about it.

Thanks for the reply. I have the labels beforehand too. How do I go about that?
I have exported my learner as well. I need to add the test dataset with labels. Can you please help?

Sure! Here’s a notebook link however if you need more guidance when I’m at a computer I can show code. Is it tabular or image.

I am using image dataset with classification labels. I’ll take a look and let you know!

Sounds good :slight_smile: the above method works for images too.

1 Like

I also had another question. When I predict for a test img with labels and calculate the loss, I want to backprop this loss to the input image and calculate the total error at the input layer. What kind of parameters can I pass in “learn.backward(item)”? Is this the right way to go about this?

That one I don’t quite know the answer to my apologies :confused: hopefully someone can chime in with that!

No worries :slight_smile: