# CNN clasification model loss stuck at same value

I have CNN model to classify 2 classes. (Yes or No) I use categorical_crossentropy loss and softmax activation at the end. For input I use image with all 3 channels, for output I use One hot encoded vector ([0,1] or [1,0])

I have function that guaranty me, that each batch I have same number of one and another class, so the classes are not unevenly represented.

What happened when I train the model is that I am stuck at same loss while trening,...

I assume that model predict always same class and half in batch has loss 0 half of them max, so that bring it to 8 all the time,...

What could went wrong?

The network is something like this :

x = Conv2D(16, (3, 3), padding='same')(input_img)
x = LeakyReLU(0.1)(x)
x = Conv2D(32 , (3, 3), padding='same')(x)
x = LeakyReLU(0.1)(x)
x = MaxPooling2D((2, 2))(x)
x = Dropout(0.25)(x)
x = Conv2D(32 , (3, 3), padding='same')(x)
x = LeakyReLU(0.1)(x)
x = Conv2D(48 , (3, 3), padding='same')(x)
x = LeakyReLU(0.1)(x)
x = MaxPooling2D((2, 2))(x)
x = Dropout(0.25)(x)

x = Flatten()(x)
x = Dense(4096)(x)
x = LeakyReLU(0.1)(x)
x = Dropout(0.5)(x)
x = Dense(2048)(x)
x = LeakyReLU(0.1)(x)
x = Dropout(0.5)(x)
out = Dense(2, activation='softmax', name='table')(x)

model = Model(input_img, out)