Improving testing accuracy

I’m currently working on a classification model whose input are x-ray images, i need to classify it into the respective disease categories. I have trained resnet 18 (not pretrained )on a data-set of 100 images per class.

I have 1050 images for training and 450 images for testing (70:30 split).

On running for 50 epochs the accuracy goes to 92 percent, but the testing accuracy isn’t good at all it is just about 15 %, i think the model is overfitting,

can anyone suggest as to what can be done to improve the testing accuracy?

I have grey scale images and i have down-scaled them to 224 x 224 so image shape is [1,224,224].

I have modified the first conv2d layer to accept grey scale images and last layer of resnet to output the required number of classes.

I’m a beginner, it would great if anyone can help with this. :smiley:

You could divide your entire dataset into training (80) , validation (10), and testing (10) , and do a traning scheme like . Also don’t forget to set the model in training mode with model.train() and when evaluate, either in validation or training, set to evaluation mode with model.eval()

Okay will try that…!