title: automatically compare results of two cnn models in keras
body: <p>I'm following this blog post :
  <a href="https://yashk2810.github.io/Applying-Convolutional-Neural-Network-on-the-MNIST-dataset/" rel="nofollow noreferrer">https://yashk2810.github.io/Applying-Convolutional-Neural-Network-on-the-MNIST-dataset/</a><br>
  and using the model there to work with my data. </p>
  
  <p>The keras model used is :  </p>
  
  <pre><code>model = Sequential()
  
  model.add(Conv2D(32, (3, 3), input_shape=(28,28,1)))
  model.add(BatchNormalization(axis=-1))
  model.add(Activation('relu'))
  model.add(Conv2D(32, (3, 3)))
  model.add(BatchNormalization(axis=-1))
  model.add(Activation('relu'))
  model.add(MaxPooling2D(pool_size=(2,2)))
  
  model.add(Conv2D(64,(3, 3)))
  model.add(BatchNormalization(axis=-1))
  model.add(Activation('relu'))
  model.add(Conv2D(64, (3, 3)))
  model.add(BatchNormalization(axis=-1))
  model.add(Activation('relu'))
  model.add(MaxPooling2D(pool_size=(2,2)))
  
  model.add(Flatten())
  
  # Fully connected layer
  model.add(Dense(512))
  model.add(BatchNormalization())
  model.add(Activation('relu'))
  model.add(Dropout(0.2))
  model.add(Dense(10))
  
  model.add(Activation('softmax'))  
  </code></pre>
  
  <p>Say above is Model A, having batch Normalization, and Model B is replica of Model A but without Batch Normalization.   </p>
  
  <p>I have 15 test files for which I'm calculating precision recall accuracy etc.<br>
  Currently I'm training Model A noting down results that appear on the terminal, and then training Model B and noting those results and comparing.   </p>
  
  <p>Is there a way to automatically save the results from both models to a tabular format so that I can easily compare how the various metrics differ in both cases?</p>
  
  <p>is it not very important but , 
  The structure I have in mind is something like an R dataframe</p>
  
  <pre><code>Filename  |  Model | Metric1 | Metric2  
  a              A       90%      80%
  b              A       60%      90%
  a              B       70%      81%  
  </code></pre>
  
  <p>Thank you.</p>
  
  <p>PS : just to be clear, I know that I can save results from each run to a list/dict and then reshape it as I want. </p>
  
  <p>My question, If i declare 3-4 models, how do I compare the performance automatically?</p>