Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tensorboard keras debugger feature #1097

Closed
JonathanCMitchell opened this issue Apr 2, 2018 · 2 comments
Closed

Tensorboard keras debugger feature #1097

JonathanCMitchell opened this issue Apr 2, 2018 · 2 comments
Assignees

Comments

@JonathanCMitchell
Copy link

JonathanCMitchell commented Apr 2, 2018

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

@caisq
Copy link
Contributor

caisq commented Apr 3, 2018

@JonathanCMitchell LocalCLIDebugWrapperSession you are using is for the command-line interface, not the graphical debugger plugin. Can you try using TensorBoardDebugWrapperSession instead?

@nfelt
Copy link
Contributor

nfelt commented Apr 3, 2018

@caisq Hmm should the example snippet be updated then?

keras.backend.set_session(
tf_debug.LocalCLIDebugWrapperSession(tf.Session()), "[[_host]]:[[_port]]")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants