title: Set up tensorboard on Matterport - Mask RCNN
body: <p>I am following this <a href="https://machinelearningmastery.com/how-to-train-an-object-detection-model-with-keras/" rel="nofollow noreferrer">tutorial</a> for image detection using <a href="https://github.com/matterport/Mask_RCNN" rel="nofollow noreferrer">Matterport</a> repo.
  I tried following this <a href="https://www.tensorflow.org/tensorboard/get_started" rel="nofollow noreferrer">guide</a> and edited the code to</p>
  
  <p>How can I edit the following code to visualize the tensorboard ?</p>
  
  <pre><code>import tensorflow as tf
  import datetime
  %load_ext tensorboard
  
  sess = tf.Session()
  
  file_writer = tf.summary.FileWriter('/path/to/logs', sess.graph)
  </code></pre>
  
  <p>And then in the model area</p>
  
  <pre><code># prepare config
  config = KangarooConfig()
  config.display()
  
  # define the model
  model = MaskRCNN(mode='training', model_dir='./', config=config)
  model.keras_model.metrics_tensors = []
  
  
  # Tensorflow board
  logdir = os.path.join(
      "logs", datetime.datetime.now().strftime("%Y%m%d-%H%M%S"))
  tensorboard_callback = tf.keras.callbacks.TensorBoard(logdir, histogram_freq=1)
  
  # load weights (mscoco) and exclude the output layers
  model.load_weights('mask_rcnn_coco.h5',
                     by_name=True,
                     exclude=[
                         "mrcnn_class_logits", "mrcnn_bbox_fc", "mrcnn_bbox",
                         "mrcnn_mask"
                     ])
  
  # train weights (output layers or 'heads')
  model.train(train_set,
              test_set,
              learning_rate=config.LEARNING_RATE,
              epochs=5,
              layers='heads')
  </code></pre>
  
  <p>I am not sure where to  <code>callbacks=[tensorboard_callback]</code> ?</p>