What is the difference between Keras model.evaluate() and model.predict()?
问题 I used Keras biomedical image segmentation to segment brain neurons. I used model.evaluate() it gave me Dice coefficient: 0.916. However, when I used model.predict() , then loop through the predicted images by calculating the Dice coefficient, the Dice coefficient is 0.82. Why are these two values different? 回答1: The problem lies in the fact that every metric in Keras is evaluated in a following manner: For each batch a metric value is evaluated. A current value of loss (after k batches is