title: Validation accuracy reaching a certain value and doesn't increase no matter what layers I change
body: <p>I have been trying to create a model to predict type of flower based on the image dataset of flower from a Kaggle dataset. I already tried various options of layers and optimizers, for example increasing number of conv layers,or changing the filters. But, no matter what I change, the validation accuracy reaches the same value and doesn't change. I think that I'm having a problem somewhere else, but I don't know where exactly. The code I'm using is as follows.</p>
  
  <pre><code>from tensorflow.keras.applications.resnet50 import preprocess_input
  from tensorflow.keras.preprocessing.image import ImageDataGenerator
  
  data_generator_with_aug = ImageDataGenerator(preprocessing_function=preprocess_input,rescale=1./255,
                                                horizontal_flip = True,
                                                width_shift_range = 0.1,
                                                height_shift_range = 0.1,validation_split=0.2)
  
  data_generator_no_aug = ImageDataGenerator(preprocessing_function=preprocess_input,validation_split=0.2)
  
  image_size=240
  train_generator = data_generator_with_aug.flow_from_directory(
      '../content/flowers',target_size=(image_size,image_size), batch_size=32, class_mode='categorical',subset='training',color_mode='rgb')
  
  validation_generator = data_generator_with_aug.flow_from_directory(
      '../content/flowers', # same directory as training data
      target_size=(image_size, image_size),
      batch_size=32,
      class_mode='categorical',
      subset='validation')
  
  from tensorflow.keras.models import Sequential
  from tensorflow.keras.layers import Dense, Flatten, GlobalAveragePooling2D, Conv2D, MaxPooling2D, Activation
  
  model=Sequential()
  model.add(Conv2D(128,input_shape=(image_size,image_size,3), kernel_size=(3,3), activation='relu'))
  model.add(Conv2D(128,kernel_size=(3,3),activation='relu'))
  model.add(Conv2D(64,kernel_size=(3,3),activation='relu'))
  model.add(GlobalAveragePooling2D())
  model.add(Dense(128,activation='relu'))
  model.add(Dense(6,activation='softmax'))
  
  import keras
  model.compile(loss=keras.losses.categorical_crossentropy,
                optimizer='adam',
                metrics=['accuracy'])
  
  model.fit_generator(
          train_generator,
          epochs = 20,
          steps_per_epoch=10,
          validation_data=validation_generator)
  </code></pre>
  
  <p>The output for this as follows</p>
  
  <pre><code>Epoch 1/20
   9/10 [==========================&gt;...] - ETA: 0s - loss: 1.8361 - acc: 0.3426Epoch 1/20
  144/10 [================================================================================================================================================================================================================================================================================================================================================================================================================================================] - 28s 193ms/step - loss: 1.7156 - acc: 0.5009
  10/10 [==============================] - 30s 3s/step - loss: 1.7965 - acc: 0.3750 - val_loss: 1.6750 - val_acc: 0.5009
  Epoch 2/20
   9/10 [==========================&gt;...] - ETA: 0s - loss: 1.6037 - acc: 0.5648Epoch 1/20
  144/10 [================================================================================================================================================================================================================================================================================================================================================================================================================================================] - 27s 188ms/step - loss: 1.7528 - acc: 0.5009
  10/10 [==============================] - 28s 3s/step - loss: 1.6229 - acc: 0.5417 - val_loss: 1.5765 - val_acc: 0.5009
  Epoch 3/20
   9/10 [==========================&gt;...] - ETA: 0s - loss: 1.4273 - acc: 0.5278Epoch 1/20
  144/10 [================================================================================================================================================================================================================================================================================================================================================================================================================================================] - 27s 189ms/step - loss: 1.7291 - acc: 0.5009
  10/10 [==============================] - 28s 3s/step - loss: 1.4150 - acc: 0.5333 - val_loss: 1.5868 - val_acc: 0.5009
  Epoch 4/20
   9/10 [==========================&gt;...] - ETA: 0s - loss: 1.5868 - acc: 0.4630Epoch 1/20
  144/10 [================================================================================================================================================================================================================================================================================================================================================================================================================================================] - 27s 188ms/step - loss: 1.5234 - acc: 0.5009
  10/10 [==============================] - 28s 3s/step - loss: 1.5748 - acc: 0.4667 - val_loss: 1.5052 - val_acc: 0.5009
  Epoch 5/20
   9/10 [==========================&gt;...] - ETA: 0s - loss: 1.4770 - acc: 0.4815Epoch 1/20
  144/10 [================================================================================================================================================================================================================================================================================================================================================================================================================================================] - 27s 189ms/step - loss: 1.5737 - acc: 0.5009
  10/10 [==============================] - 28s 3s/step - loss: 1.4732 - acc: 0.4833 - val_loss: 1.5131 - val_acc: 0.5009
  Epoch 6/20
   9/10 [==========================&gt;...] - ETA: 0s - loss: 1.3751 - acc: 0.5741Epoch 1/20
  144/10 [================================================================================================================================================================================================================================================================================================================================================================================================================================================] - 27s 189ms/step - loss: 1.5204 - acc: 0.5009
  10/10 [==============================] - 28s 3s/step - loss: 1.3782 - acc: 0.5750 - val_loss: 1.4613 - val_acc: 0.5009
  Epoch 7/20
   9/10 [==========================&gt;...] - ETA: 0s - loss: 1.4134 - acc: 0.5093Epoch 1/20
  144/10 [================================================================================================================================================================================================================================================================================================================================================================================================================================================] - 27s 187ms/step - loss: 1.4864 - acc: 0.5084
  10/10 [==============================] - 28s 3s/step - loss: 1.4061 - acc: 0.5167 - val_loss: 1.5240 - val_acc: 0.5084
  Epoch 8/20
   9/10 [==========================&gt;...] - ETA: 0s - loss: 1.4955 - acc: 0.5648Epoch 1/20
  144/10 [================================================================================================================================================================================================================================================================================================================================================================================================================================================] - 28s 192ms/step - loss: 1.4305 - acc: 0.5009
  10/10 [==============================] - 28s 3s/step - loss: 1.4524 - acc: 0.5833 - val_loss: 1.5050 - val_acc: 0.5009
  Epoch 9/20
   9/10 [==========================&gt;...] - ETA: 0s - loss: 1.5669 - acc: 0.4352Epoch 1/20
  144/10 [================================================================================================================================================================================================================================================================================================================================================================================================================================================] - 27s 189ms/step - loss: 1.3848 - acc: 0.5020
  10/10 [==============================] - 28s 3s/step - loss: 1.5675 - acc: 0.4333 - val_loss: 1.4219 - val_acc: 0.5020
  Epoch 10/20
   9/10 [==========================&gt;...] - ETA: 0s - loss: 1.2631 - acc: 0.5556Epoch 1/20
  144/10 [================================================================================================================================================================================================================================================================================================================================================================================================================================================] - 27s 189ms/step - loss: 1.4723 - acc: 0.5014
  10/10 [==============================] - 28s 3s/step - loss: 1.2575 - acc: 0.5583 - val_loss: 1.5531 - val_acc: 0.5014
  Epoch 11/20
   9/10 [==========================&gt;...] - ETA: 0s - loss: 1.5603 - acc: 0.4074Epoch 1/20
  144/10 [================================================================================================================================================================================================================================================================================================================================================================================================================================================] - 27s 189ms/step - loss: 1.3506 - acc: 0.5345
  10/10 [==============================] - 28s 3s/step - loss: 1.5461 - acc: 0.4167 - val_loss: 1.4463 - val_acc: 0.5345
  Epoch 12/20
   9/10 [==========================&gt;...] - ETA: 0s - loss: 1.3654 - acc: 0.5278Epoch 1/20
  144/10 [================================================================================================================================================================================================================================================================================================================================================================================================================================================] - 27s 188ms/step - loss: 1.2601 - acc: 0.5339
  10/10 [==============================] - 28s 3s/step - loss: 1.3844 - acc: 0.5083 - val_loss: 1.3356 - val_acc: 0.5339
  Epoch 13/20
   9/10 [==========================&gt;...] - ETA: 0s - loss: 1.4722 - acc: 0.3889Epoch 1/20
  144/10 [================================================================================================================================================================================================================================================================================================================================================================================================================================================] - 27s 188ms/step - loss: 1.5981 - acc: 0.5113
  10/10 [==============================] - 28s 3s/step - loss: 1.4693 - acc: 0.3833 - val_loss: 1.4915 - val_acc: 0.5113
  Epoch 14/20
   9/10 [==========================&gt;...] - ETA: 0s - loss: 1.3568 - acc: 0.5648Epoch 1/20
  144/10 [================================================================================================================================================================================================================================================================================================================================================================================================================================================] - 27s 189ms/step - loss: 1.3523 - acc: 0.5009
  10/10 [==============================] - 28s 3s/step - loss: 1.3668 - acc: 0.5500 - val_loss: 1.4202 - val_acc: 0.5009
  Epoch 15/20
   9/10 [==========================&gt;...] - ETA: 0s - loss: 1.3153 - acc: 0.5556Epoch 1/20
  144/10 [================================================================================================================================================================================================================================================================================================================================================================================================================================================] - 27s 187ms/step - loss: 1.4327 - acc: 0.5009
  10/10 [==============================] - 28s 3s/step - loss: 1.3479 - acc: 0.5333 - val_loss: 1.5144 - val_acc: 0.5009
  Epoch 16/20
   9/10 [==========================&gt;...] - ETA: 0s - loss: 1.3491 - acc: 0.5278Epoch 1/20
  144/10 [================================================================================================================================================================================================================================================================================================================================================================================================================================================] - 28s 192ms/step - loss: 1.4084 - acc: 0.5009
  10/10 [==============================] - 28s 3s/step - loss: 1.3641 - acc: 0.5250 - val_loss: 1.4756 - val_acc: 0.5009
  Epoch 17/20
   9/10 [==========================&gt;...] - ETA: 0s - loss: 1.4532 - acc: 0.4444Epoch 1/20
  144/10 [================================================================================================================================================================================================================================================================================================================================================================================================================================================] - 27s 189ms/step - loss: 1.3895 - acc: 0.5009
  10/10 [==============================] - 28s 3s/step - loss: 1.4501 - acc: 0.4500 - val_loss: 1.4436 - val_acc: 0.5009
  Epoch 18/20
   9/10 [==========================&gt;...] - ETA: 0s - loss: 1.4398 - acc: 0.4815Epoch 1/20
  144/10 [================================================================================================================================================================================================================================================================================================================================================================================================================================================] - 27s 188ms/step - loss: 1.3809 - acc: 0.5009
  10/10 [==============================] - 28s 3s/step - loss: 1.4199 - acc: 0.4833 - val_loss: 1.4092 - val_acc: 0.5009
  Epoch 19/20
   9/10 [==========================&gt;...] - ETA: 0s - loss: 1.3896 - acc: 0.4630Epoch 1/20
  144/10 [================================================================================================================================================================================================================================================================================================================================================================================================================================================] - 27s 189ms/step - loss: 1.4327 - acc: 0.5032
  10/10 [==============================] - 28s 3s/step - loss: 1.3540 - acc: 0.4917 - val_loss: 1.3641 - val_acc: 0.5032
  Epoch 20/20
   9/10 [==========================&gt;...] - ETA: 0s - loss: 1.3058 - acc: 0.5833Epoch 1/20
  144/10 [================================================================================================================================================================================================================================================================================================================================================================================================================================================] - 27s 188ms/step - loss: 1.4829 - acc: 0.5009
  10/10 [==============================] - 28s 3s/step - loss: 1.3294 - acc: 0.5583 - val_loss: 1.3708 - val_acc: 0.5009
  &lt;tensorflow.python.keras.callbacks.History at 0x7f4e50dfa7b8&gt;
  </code></pre>