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

When using keras, it writes all executions in same graph 'training' #3

Open
dingus221 opened this issue Sep 12, 2018 · 1 comment
Open

Comments

@dingus221
Copy link

Directory path is hardcoded as 'training', right?
training_log_dir = os.path.join(log_dir, 'training')

@PRaezUC3M
Copy link

PRaezUC3M commented Dec 3, 2018

I just rewrote the init method for that. It's a really simple fix but it helps a lot when comparing executions.

class TensorBoardColabCallback(TensorBoard):
    def __init__(self, tbc=None, write_graph=True, name=None, **kwargs):
        # Make the original `TensorBoard` log to a subdirectory 'training'

        if tbc is None:
            return

        log_dir = tbc.get_graph_path()

        training_log_dir = os.path.join(log_dir, 'training_{}'.format(name))
        super(TensorBoardColabCallback, self).__init__(training_log_dir, **kwargs)

        # Log the validation metrics to a separate subdirectory
        self.val_log_dir = os.path.join(log_dir, 'validation_{}'.format(name))

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

No branches or pull requests

2 participants