title: Predict and evaluate metrics in Keras
body: <p>After model's training how can I predict and evaluate my metrics?<br>
  Code is like this:  </p>
  
  <pre><code>for patch in generator():
      pred = model.predict(np.array(patch, dtype=patch.dtype))
  
      loss_val_partial,accuracy_val_partial = model.test_on_batch(np.array(patch, dtype=patch.dtype),pred) 
  </code></pre>
  
  <p>or like this:</p>
  
  <pre><code>for patch in generator():
      pred = model.predict(np.array(patch, dtype=patch.dtype))
  
      loss_val_partial,accuracy_val_partial = model.test_on_batch(ground_truth,pred) 
  </code></pre>
  
  <p>where ground truth is the true label of the patch.</p>
  
  <p>I don't think the first is right because the accuracy is always 1.0</p>