title: Error - AttributeError: module 'keras' has no attribute 'sum'
body: <p>I'm using the following helper functions to compute Precision, Recall and F1-Score:</p>
  <pre><code>def recall_m(y_true, y_pred):
      true_positives = K.sum(K.round(K.clip(y_true * y_pred, 0, 1)))
      possible_positives = K.sum(K.round(K.clip(y_true, 0, 1)))
      recall = true_positives / (possible_positives + K.epsilon())
      return recall
  
  def precision_m(y_true, y_pred):
      true_positives = K.sum(K.round(K.clip(y_true * y_pred, 0, 1)))
      predicted_positives = K.sum(K.round(K.clip(y_pred, 0, 1)))
      precision = true_positives / (predicted_positives + K.epsilon())
      return precision
  
  def f1_m(y_true, y_pred):
      precision = precision_m(y_true, y_pred)
      recall = recall_m(y_true, y_pred)
      return 2*((precision*recall)/(precision+recall+K.epsilon()))
  </code></pre>
  <p>I have tried the following imports for Keras:</p>
  <pre><code>import keras as K
  import keras
  </code></pre>
  <p>But I get the error:</p>
  <blockquote>
  <p> in f1_m(y_true, y_pred)
  12
  13 def f1_m(y_true, y_pred):
  ---&gt; 14     precision = precision_m(y_true, y_pred)
  15     recall = recall_m(y_true, y_pred)
  16     return 2*((precision*recall)/(precision+recall+K.epsilon()))</p>
  <p> in precision_m(y_true, y_pred)
  6
  7 def precision_m(y_true, y_pred):
  ----&gt; 8     true_positives = K.sum(K.round(K.clip(y_true * y_pred, 0, 1)))
  9     predicted_positives = K.sum(K.round(K.clip(y_pred, 0, 1)))
  10     precision = true_positives / (predicted_positives + K.epsilon())</p>
  <p>AttributeError: module 'keras' has no attribute 'sum'</p>
  </blockquote>
  <p>How can I solve this ?</p>