How to predict and save the prediction into the kagge format

Dear all,

so I just started my journey throw the fast ai course.

And I have a simple question:

how to predict cats and dogs for the Kaggle challenge?
I mean how to apply my model to the test data and get a file which I can submit.

As far as I understood, I have to use:

vgg.predict, but I’m not sure…

Kind regards,

Hi @vad congrats on starting the course! I’m near the end of my part 1 journey.

If you’ve finished lesson 1, and assuming you’re using the file provided, take some time to review it. Your answer is in there :slight_smile:

Also, regarding the format, you basically have to create an output csv file to be similar to the sample submission file that kaggle provides (many ways to do this). You can also take a glance at the next lesson (dogs_cats_redux.ipynb) but try to figure it out yourself first and then look.

Hope that helps.


Hi Jason,

thank you for the hint :slight_smile:

for those who will come here for answers, I recommend to check out keras.predict_generator Also, the dogs_cats_redux notebook is basically the answer.