title: RuntimeWarning: Method (on_train_batch_end) is slow compared to the batch update
body: <p>I'm trying to learn how machine learning works in Python using Keras. To learn this I use websites and tutorials. My problem is: even if I exactly copy their code, I still get a warning and it runs very slow. It can take minutes to run a few epochs and every few epochs I get this warning: </p>
  
  <pre><code>Warning (from warnings module):
    File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/keras/callbacks/callbacks.py", line 95
      % (hook_name, delta_t_median), RuntimeWarning)
  RuntimeWarning: Method (on_train_batch_end) is slow compared to the batch update (0.115399). Check your callbacks.
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>from numpy import loadtxt
  from keras.models import Sequential
  from keras.layers import Dense
  
  dataset = loadtxt('data_m3_2.csv', delimiter=',')
  #8 input variables (X). 1 output variable, 0 or 1 (y)
  X = dataset[:,0:8] #columns 0 to 7 ??
  y = dataset[:,8]
  
  model = Sequential()
  model.add(Dense(12, input_dim=8, activation='relu')) #defines input layer and first hidden layer
  model.add(Dense(8,activation='relu'))
  model.add(Dense(1, activation='sigmoid')) #sigmoid to ensure output between 0 and 1
  
  model.compile(loss='binary_crossentropy',optimizer='adam',metrics=['accuracy'])
  
  model.fit(X, y, epochs=3, batch_size=10)
  </code></pre>