0

I am training on tiny imagenet with 200 classes in keras using GPU in google colab. The validation set has 10K size, with each class having 50 samples. My validation accuracy is 48.5% with some classes having very low correct predictions, eg 3 out of 50. For greater accuracy on the same architecture(simplified densenet), I am thinking of using class_weight parameter of model.fit_generator.

I have seen class_weights being used to balance out imbalanced classes, but not for low accuracy classes. So is this feasible and is there any good reference on it?

kakoli
  • 423
  • 4
  • 8
  • 18
  • How is the balance of the training set for those 200 classes ? – venkata krishnan Jul 25 '19 at 05:49
  • Possible duplicate of [keras image preprocessing unbalanced data](https://stackoverflow.com/questions/44666910/keras-image-preprocessing-unbalanced-data) – venkata krishnan Jul 25 '19 at 05:51
  • The training set is perfectly balanced with each of the 200 classes with 500 samples each. So it is not a problem of unbalanced data set for which documentation is available. But still, there are classes which are getting high accuracy 48/50, and few with less than 5 out of 50. – kakoli Jul 25 '19 at 08:14
  • In the confusion matrix, were you able to observe were these low accuracy classes are moved towards one class or simply spread across all other classes ? what I meant is, lets say class A precision is 5/50 images, the rest of the 45/50 is it predicted mostly as class B or randomly as class D,E... and so on ? – venkata krishnan Jul 25 '19 at 08:18
  • can you also provide information about what loss function you are using ? and more information on the training statistics ? – venkata krishnan Jul 25 '19 at 08:18
  • loss='categorical_crossentropy', optimizer='adam'. Will get back on the confusion matrix. – kakoli Jul 25 '19 at 10:28

0 Answers0