title: Keras prints no output, high memory and CPU usage and GPU is not used when using tensorboard Callback
body: <p>I have a wierd situation in Keras and it really freaks me out.
  I am trying to train a CNN using pretrained Inception with additional convolution, global average pool and dense layers. I am using a ImageDataGenerator to load the data.</p>
  
  <p>The data generator is working fine, I have tested that. The model compiles well also. But when I run fit_generator, no output is printed, the CPU is at 100% and memory starts filling up slowly until it overflows. And although I have a GPU and have worked with it in tensorflow (which is the backend here) a number of times, it is completely ignored by Keras.</p>
  
  <p>Considering that maybe batch size could be a problem, I set it to 1 but it did not solve the issue. The images are of size 299x299, which is not that big anyway.</p>
  
  <p>I will post the code below as a reference though it seems to me that nothing is wrong with it:</p>
  
  <pre><code>def get_datagen():
      return ImageDataGenerator(rotation_range=30,
                          width_shift_range=0.2,
                          height_shift_range=0.2,
                          horizontal_flip=True,
                          fill_mode='nearest'
                          )
  
  # Setup and compile the model.
  model = InceptionV3(include_top=False, input_shape=(None, None, 3))
  
  # Set the model layers to be untrainable
  for layer in model.layers:
      layer.trainable = False
  
  x = model.output
  x = Conv2D(120, 5, activation='relu')(x)
  x = GlobalAveragePooling2D()(x)
  predictions = Activation('softmax')(x)
  
  model_final = Model(inputs=model.inputs, outputs=predictions)
  
  model_final.compile(optimizer='adam', loss='categorical_crossentropy',metrics=['accuracy'])
  
  # Define the dataflow.
  train_gen = get_datagen()
  val_test_gen = get_datagen()
  
  train_data = train_gen.flow_from_directory(train_folder, target_size=(299, 299), batch_size=1)
  val_data = val_test_gen.flow_from_directory(validation_folder, target_size=(299, 299), batch_size=1)
  test_data = val_test_gen.flow_from_directory(test_folder, target_size=(299, 299), batch_size=1)
  
  train_size = train_data.n
  val_size = val_data.n
  test_size = test_data.n
  
  # Define callbacks.
  model_checkpoint = ModelCheckpoint('../models/dbc1/', monitor='val_accuracy', verbose=1, save_best_only=True)
  early_stopping = EarlyStopping(monitor='val_accuracy', patience=3, verbose=1, mode='max')
  tensorboard = TensorBoard(log_dir='../log/dbc1', histogram_freq=1, write_grads=True, )
  
  
  model_final.fit_generator(train_data, steps_per_epoch=1, epochs=100, 
                            callbacks=[model_checkpoint, early_stopping, tensorboard],
                           validation_data=val_data, verbose=1)
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>It seems the tensorboard callback was the problem here. When I remove it, everything works. Does anyone know why this is happening?</p>