title: Trying to get the val_loss from training a model
body: <p>I have the following class in which I try to get a list of tuples containing the loss and validation loss per training </p>
  
  <pre><code>class LossHistory(keras.callbacks.Callback):
      def on_train_begin(self, logs={}):
          self.losses = []
  
      def on_batch_end(self, batch, logs={}):
          self.losses.append((logs.get('loss'), logs.get('val_loss')))
  </code></pre>
  
  <p>I initialize the LossHistory object before </p>
  
  <pre><code>history = LossHistory()
  </code></pre>
  
  <p>And then I pass it to the fit method on my model in the following way</p>
  
  <pre><code>regressor.fit(X_train, y_train, batch_size=32, epochs=200, validation_split = 0.2, callbacks = [history])
  </code></pre>
  
  <p>The problem is when I try to get <code>history.losses[0][1]</code> the value return is a noneType and it shouldn't be</p>
  
  <p>I don't know what I'm doing wrong here, I'm kind of stuck on this for some time.</p>