title: Constant Accuracy in CNN
body: <p>I am trying train a Vigg19 network with <a href="http://www.robots.ox.ac.uk/%7Evgg/data/fgvc-aircraft/" rel="nofollow noreferrer">Fine-Grained Visual Classification of Aircraft</a> benchmark data set. I chose 3 aircraft family. Using the text files that are given in dataset, I manage to construct a dataframe in order to use flow_from_dataframe generator.</p>
  <pre><code>df = pd.read_csv(&quot;./train_family.csv&quot;)
  df_test = pd.read_csv(&quot;./test_family.csv&quot;)
  
  datagen=ImageDataGenerator(rescale=1./255.,validation_split=0.25,rotation_range=10, horizontal_flip=True, vertical_flip=True)
  train_generator=datagen.flow_from_dataframe(dataframe=df, 
                                              directory=&quot;./data/images&quot;, 
                                              x_col=&quot;train&quot;, y_col=&quot;labels&quot;, 
                                              class_mode=&quot;categorical&quot;, target_size=(224,224), batch_size=8, seed = 19, shuffle = True, color_mode = &quot;rgb&quot;,
                                              subset = &quot;training&quot;)
  
  valid_generator=datagen.flow_from_dataframe(dataframe=df, 
                                              directory=&quot;./data/images&quot;, 
                                              x_col=&quot;train&quot;, y_col=&quot;labels&quot;, 
                                              class_mode=&quot;categorical&quot;, target_size=(224,224), batch_size=8, seed = 19, shuffle = True, color_mode = &quot;rgb&quot;,
                                              subset = &quot;validation&quot;)
  
  test_generator=datagen.flow_from_dataframe(dataframe=df_test, 
                                              directory=&quot;./data/images&quot;, 
                                              x_col=&quot;test&quot;, y_col=&quot;labels&quot;, 
                                              class_mode=&quot;categorical&quot;, target_size=(224,224), batch_size=8, seed = 19, shuffle = False, color_mode = &quot;rgb&quot;)
  </code></pre>
  <p>While fitting the model, algorithm always gives the same validation accuracy which is &quot;1&quot;</p>
  <blockquote>
  <p>loss: 5.5803 - acc: 0.6538 - val_loss: 1.1921e-07 - <strong>val_acc: 1.0000</strong></p>
  </blockquote>
  <p>I did some digging, maybe the problem caused by the amount of data in my train/val/test sets. Below, you can see the output of generator for train, validation and test sets respectively.</p>
  <pre><code>Found 550 images belonging to 3 classes.
  Found 183 images belonging to 3 classes.
  Found 367 images belonging to 3 classes.
  </code></pre>
  <p>Should I increase the train set by decreasing the test set?</p>
  <p>Thanks</p>