diffusion_models.utils.tensorboard ================================== .. py:module:: diffusion_models.utils.tensorboard Module Contents --------------- .. py:class:: TensorboardManager(log_name = None, log_directory = None) A tensorboard manager for simplified tensorboard logging. :param log_name: The name of the tensorboard log run. :param log_directory: An explicit directory to write logs to. When provided, it takes precedence over ``log_name``. .. py:attribute:: summary_writer The tensorboard summary writer. .. py:method:: log_metrics(metrics, global_step) Log metrics to tensorboard. :param metrics: A dictionary mapping metric names to values. :param global_step: The step at which the metrics are recorded. .. py:method:: log_images(tag, images, timestep) Log images to tensorboard. :param tag: The name to give the images in tensorboard. :param images: A tensor representing the images to log. :param timestep: The timestep at which the images are produced. .. py:method:: log_text(tag, text, global_step = 0) Log text to tensorboard. :param tag: The name to give the text in tensorboard. :param text: The text to log (rendered as markdown by tensorboard). :param global_step: The step at which the text is recorded. .. py:method:: log_weights(model, global_step) Log a histogram of every model parameter to tensorboard. :param model: The model whose parameters are logged. :param global_step: The step at which the weights are recorded.