[docs]classTensorboardEventHandler:""" TensorboardEventHandler is an event handler that will write known events to the provided SummaryWriter. This currently only supports ``torch.monitor.Stat`` events which are logged as scalars. Example: >>> # xdoctest: +REQUIRES(env:TORCH_DOCTEST_MONITOR) >>> # xdoctest: +REQUIRES(module:tensorboard) >>> from torch.utils.tensorboard import SummaryWriter >>> from torch.monitor import TensorboardEventHandler, register_event_handler >>> writer = SummaryWriter("log_dir") >>> register_event_handler(TensorboardEventHandler(writer)) """
[docs]def__init__(self,writer:"SummaryWriter")->None:""" Constructs the ``TensorboardEventHandler``. """self._writer=writer
To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.