Skip to content

Tensorboard keras debugger feature #1097

@JonathanCMitchell

Description

@JonathanCMitchell

I am unable to use the latest Tensorboard debugging feature with keras. When following the documentation posted here and elsewhere I was instructed to insert the code snippet below:

import keras
from tensorflow.python import debug as tf_debug
keras.backend.set_session(
    tf_debug.LocalCLIDebugWrapperSession(tf.Session()), "<USER>:7000")


<Model fit generator stuff here>

Then I run the command tensorboard --logdir=/logs/ --reload_interval=1 --debugger_port 7000 in a terminal window.

Then I run the program containing the model file and the fit_generator and I get this error

2018-04-02 15:00:01.435906: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce GTX 1060, pci bus id: 0000:01:00.0, compute capability: 6.1)
Traceback (most recent call last):
  File "coco.py", line 505, in <module>
    layers='heads')
  File "/home/jon/Documents/Mask_RCNN/model.py", line 2296, in train
    tf_debug.LocalCLIDebugWrapperSession(tf.Session()), "jon:7000")
TypeError: set_session() takes 1 positional argument but 2 were given

When I simply ommit the second argument to tf_debug.LocalCLIDebugWrapperSession(), I get the terminal output of tfdgb and it doesn't forward the port to tensorboard.

Is this a versioning issue?
==== Versions ===
Tensorboard v 1.7
Tensorflow v 1.4.0
Keras v 2.4.1
Python3.5
Ubuntu 16.04

When I look at the keras.callbacks.py file it is clear that the function set_session only contains one argument. You can see that here

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions