overfitted model

#1
by Asimuddin11 - opened

Good effort; however, the model requires some adjustments. It appears to be overfitted. Consider incorporating more tumor images (your dataset have more normal images then tumor images) into your dataset or implementing dropout layers in your model , or give high priority to other classes using classes weights.....

model = Sequential()

model.add(Conv2D(32, kernel_size=(2,2), input_shape=(128,128,3),padding = 'Same'))
model.add(Conv2D(32, kernel_size=(2, 2), activation = 'relu', padding = 'Same'))

model.add(BatchNormalization())
model.add(MaxPooling2D(pool_size=(2,2)))
model.add(Dropout(0.25))

model.add(Flatten())

model.add(Dense(512, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(2, activation='softmax'))

model.compile(loss = "categorical_crossentropy", optimizer='Adamax')
print(model.summary( ))

Thank you for your insightful comment .This is how drop out has been catered for. What is your take on this? Where can I adjust? I have limited dataset downloaded from Kaggle. If you could provide more data, I would be more appreciative. Thank You

Screenshot (677).png

tmafantiri changed discussion status to closed

The above plot shows Model loss

tmafantiri changed discussion status to open

Sign up or log in to comment