0
$\begingroup$

I am training a neural network with some convolution layers for multi class image classification. I am using keras to build and train the model. I am using 1600 images for all categories for training. I have used softmax as final layer activation function.

The model predicts well on all True categories with high softmax probability. But when I test model on new or unknown data, it predicts with high softmax probability. How can I reduce that? Should I make changes in model architecture or data?

$\endgroup$

1 Answer 1

1
$\begingroup$

Seems like the network is overfit, if new/unknown data gives similar results. Implementing dropout in the layers should help with that.

Unclear if there are 1600 images total, or 1600 examples per class - if it's the former, taking a look at the ratio of positive to negative examples in the training data could be insightful.

$\endgroup$
3
  • $\begingroup$ Thank you for your reply @Joe Richardson . I am trying to classify Id cards like images. I am using 3 convolution layers in my network with dropout. Should I use more complex model or add diversity in dataset? $\endgroup$
    – komal
    Feb 12, 2022 at 19:47
  • $\begingroup$ interesting. I'd think that a majority of the content on the ID is the same between all samples - probably not enough granularity to distinguish individual text from each ID to be useful to the model? Or put another way, it seems like there would be difficulty picking up on deviations from the "average" ID without some extra help. Perhaps some pre-processing with just the faces or just the text stripped from the ID? $\endgroup$ Feb 13, 2022 at 4:09
  • $\begingroup$ Are you using a distinct class label for the absence of any of the valid classes? $\endgroup$ Jun 14, 2023 at 1:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.