title: '>' not supported between instances of 'NoneType' and 'float'
body: <p>i am working on cnn code found in &lt;://github.com/MesSem/CNNs-on-CHB-MIT/blob/master/CNN.py>  but i got this error { '>' not supported between instances of 'NoneType' and 'float' }</p>
  
  <pre><code>class EarlyStoppingByLossVal(keras.callbacks.Callback):
      def __init__(self, monitor='val_loss', value=0.00001, verbose=0, lower=True):
          super(keras.callbacks.Callback, self).__init__()
          print("val_loss\n")
          val_loss=model.evaluate(validation_data)
          self.monitor = monitor
          self.value = value
          self.verbose = verbose
          self.lower=lower
  
      def on_epoch_end(self, epoch, logs={}):
          current = logs.get(self.monitor)
          if self.lower:
              if current &lt; self.value:
                  if self.verbose &gt; 0:
                      print("Epoch %05d: early stopping THR" % epoch)
                  self.model.stop_training = True
          else:
              if current &gt; self.value:
                  if self.verbose &gt; 0:
                      print("Epoch %05d: early stopping THR" % epoch)
                  self.model.stop_training = True
  </code></pre>