title: keras constraint doesn't get called
body: <p>Keras constraint docs: <a href="https://keras.io/constraints/" rel="nofollow noreferrer">https://keras.io/constraints/</a>. 
  I used <code>NonNeg</code> constraint to keep some of my network dense layer weights positive, usage like :</p>
  
  <pre><code>layer1 = Dense(1, activation='sigmoid', use_bias=True, kernel_constraint=NonNeg())
  </code></pre>
  
  <p>But some of the layer weights is still negative, I viewed the source code of keras constraint: <a href="https://github.com/keras-team/keras/blob/master/keras/constraints.py#L62" rel="nofollow noreferrer">https://github.com/keras-team/keras/blob/master/keras/constraints.py#L62</a> , it's very straightforward. So I wonder if the constraint is not called. So I wrote a customed constraint which throw an exception directly as </p>
  
  <pre><code>class ConstraintDemo(Constraint):
      def __init__(self):
          logging.info("CONSTRAINT called")
      def __call__(self, w):
          raise RuntimeError("GLQ ERROR")
          logging.info("CONSTRAINT called")
          return tf.cast(tf.greater_equal(w, 0.), tf.float32)
  </code></pre>
  
  <p>And I called the class similarly by </p>
  
  <pre><code>layer = Dense(1, activation='sigmoid', use_bias=True, kernel_constraint=ConstraintDemo())
  </code></pre>
  
  <p>Only the <strong>init</strong> method get called.The <strong>call</strong> method should raise a RuntimeError and stop the training process. But it didn't. </p>
  
  <p>Why? </p>
  
  <p>tensorflow version: 1.12.0 </p>
  
  <p>keras version:2.0.6 </p>