Keras: what is the difference between model.evaluate_generator and model.predict_generator
<p>I used keras data augmentation to perform image classification (ten-class images). The last training epoch gives the results as follows:</p>

<pre><code>Epoch 50/50
4544/4545 [============================&gt;.] - ETA: 0s - loss: 0.7628 - acc: 0.7359 loss:  0.762710434054
New learning rate:  0.00214407973866
4545/4545 [==============================] - 115s - loss: 0.7627 - acc: 0.7360 - val_loss: 0.5563 - val_acc: 0.8124
</code></pre>

<p>Then evaluate the trained model by:</p>

<pre><code>scores = model.evaluate_generator(test_generator,1514) #1514 testing images
print("Accuracy = ", scores[1])
</code></pre>

<p>It leads to the following results:</p>

<pre><code>('Accuracy = ', 0.80713342132152621)
</code></pre>

<p>The accuracy is not exactly the same as that obtained in the last training epoch. I don't understand the difference, even though it is marginal. </p>

<p>Further, model.predict_generator gives totally different result that is an array shown as follows:</p>

<pre><code>array([[  4.98306963e-06,   1.83774697e-04,   5.49453034e-05, ...,
      9.25193787e-01,   7.74697517e-04,   5.79946618e-06],
   [  2.06657965e-02,   2.35974863e-01,   2.66802781e-05, ...,
      2.16283044e-03,   8.42395966e-05,   2.46680051e-04],
   [  1.40222355e-05,   1.22740224e-03,   7.52218883e-04, ...,
      3.76749843e-01,   3.85622412e-01,   6.47417846e-06],
   ..., 
   [  9.94064331e-01,   1.30184961e-03,   1.08694976e-05, ...,
      1.25828717e-06,   2.29093766e-05,   9.01326363e-04],
   [  7.10375488e-01,   2.01397449e-01,   3.10241080e-06, ...,
      3.66877168e-10,   1.66322934e-05,   1.93767438e-08],
   [  8.13350256e-04,   2.67575349e-04,   6.79878794e-05, ...,
      8.63052785e-01,   9.70983761e-04,   8.54507030e-04]], dtype=float32)
</code></pre>

<p>I don't know what the matrix represents, and what is the difference between model.evaluate_generator and model.predict_generator. </p>

<p>It is noted that the resultant array has a shape of 1514*10. The array should be the prediction probabilities at each class for the set of testing images. If so how to compute a confusion matrix based on the result?</p>