Pseudo Labeling in Keras

Ah yes, this was a really dumb question I asked! The answer is, ‘just concatenate it.’ :nerd:

Moving forward with the pseudolabeling, as I am sitting here implementing it, a nervous feeling is starting to grow on me.

We are basically:

  • Taking an end-to-end model we like / trust.
  • Using that model to predict classes for the test set, which is the set we will eventually submit to Kaggle.
  • Using this now larger set of data to create a presumably more effective model, we run now the test set through this final model – we now have predictions to submit to Kaggle.

But, wait, we are evaluating the test set using a final model…which was built (in part) on that same test set itself!

I was under the impression that is one of those fundamental machine learning no-nos – don’t expose data to the model that was used to actually build the model. Won’t we get overconfident probabilities, since the test set has already been seen, and those images have features that would presumably be easily recognized?