I have trained a Classifier having num_classes = 20, say 20 different animals. But during inference, I need to predict from only 4  known animals. So how can I add an additional filter to my inference code such that it will increase the probability of the outcome of these 4 animals than the other 16 animals? Now the catch here is the 4 classes of animals vary each time so I cannot add an additional layer to train.py and I have to implement this on predict.py.
So how can I add an additional filter to my inference code such that it will increase the probability of the outcome of these 4 animals than the other 16 animals?