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

Summaries in tensorboard (Image/Audio) #19

Open
swamiviv opened this issue Jan 28, 2021 · 1 comment
Open

Summaries in tensorboard (Image/Audio) #19

swamiviv opened this issue Jan 28, 2021 · 1 comment

Comments

@swamiviv
Copy link

What would be the easiest way to add non-scalar summaries to tensorboard from within genforce? I'm happy to put up a PR if you can give me a high level idea of where I could add it.

@ShenYujun
Copy link
Collaborator

The following codes give a rough idea about using Tensorboard to record images. First of all, please make sure that, in the configuration file, the controllers -> RunningLogger -> tensorboard_format is set as True (which is the default setting).

In the __init__() function of your runner, add following codes after super().__init__()

from . import controllers
for ctrl in self.controllers:
    if isinstance(ctrl, controllers.RunningLogger):
        self.running_logger = ctrl

In the train_step() function of your runner, add following codes when you want to record an image

self.running_logger.tensorboard_writer.add_image(*args, **kwargs)

I have not tested the above codes, but I hope it is enough for you to get the point :) Good luck!

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