title: Calculate accuracy from Keras model.predict_generator
body: <p>I have Keras model and I want to evaluate it using my test data.
  When I use keras <code>model.evaluate_generator</code> I get loss and acc returned by it and I can print the percentage accuracy like:</p>
  
  
  
  <pre class="lang-python prettyprint-override"><code>loss, acc = model.evaluate_generator(test_gen, steps=evaluation_steps)
  print("\n%s: %.2f%%" % (model.metrics_names[1], acc * 100))
  </code></pre>
  
  <p>This results in something like 92%.<br>
  As I wanted to create a confusion matrix (too see how much false positives and false negatives I have) I changed my code to:</p>
  
  <pre class="lang-python prettyprint-override"><code>predictions = model.predict_generator(test_gen, steps=evaluation_steps)
  y_pred = np.argmax(predictions, axis=1)
  y_true = np.argmax(labels, axis=1)
  confusion_matrix(y_true, y_pred)
  </code></pre>
  
  <p>I get correct confusion matrix with this. However, I still want that 92% displayed, can I get it from <code>predictions</code>? </p>