I am training a resnet50-based model using transfer learning. My dataset has 10 classes and about 10 occurrences per class, so it is very small. The training loss is decreasing steadily to 0.07 for 100 epochs, but when I validate it on data from another dataset the validation loss is almost constant, approximately 0.7±0.1. The test data comes from another dataset that I cannot use for training, it has the same classes present but occurrences of multiple classes in the same file, in contrast to the training data, where each file has only one class. Could this be the reason of the poor performance with the validation data? I would expect that if I train with files with one class per file, the model learns to recognize multiple classes in one file as well. I am new to deep learning, so this is a bit fuzzy for me and I would be happy to get some expert advice.

  • $\begingroup$ Did you check the probabilities of the output classes in test to see what is coming out? $\endgroup$ Commented Nov 27, 2023 at 16:53
  • $\begingroup$ Yes, the probabilities are different for every class, relatively low but all greater than 0. I see in single examples that sometimes the predictions are correct for each class and sometimes the wrong classes get higher probabilites. $\endgroup$
    – ml_nnoobb
    Commented Nov 28, 2023 at 13:46


Your Answer

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

Browse other questions tagged or ask your own question.