title: Keras Custom loss function to pass arguments other than y_true and y_pred
body: <p>I am writing a keras custom loss function where in I want to pass to this function the following:
  y_true, y_pred (these two will be passed automatically anyway), weights of a layer inside the model, and a constant.</p>
  
  <p>Something like below:</p>
  
  <pre><code>def Custom_loss(y_true, y_pred, layer_weights, val = 0.01):
      loss = mse(y_true, y_pred)
      loss += K.sum(val, K.abs(K.sum(K.square(layer_weights), axis=1)))
      return loss
  </code></pre>
  
  <p>But the above implementation gives me error.
  How can I achieve this in keras ?</p>