How can I add a histogram of weights to tensorboard
Hi
I would like to add a vector of weights to tensorboard summary during training. However, I am having a hard time figuring out how to do that. From what I understand, logging to tensorboard is handled by fairseq.logging.progress_bar.TensorboardProgressBarWrapper._log_to_tensorboard which receives the output of the criterion's forward function. However, there is no way to add_histogram instead, as all output stats are either passed to TB with add_scalar or ignored.
Is there an underlying reason to preventing adding histograms that I am missing?
If not, what is my best course of action for adding this functionality? I guess it starts with subclassing the criterion to return the correct additional quantities to log and subclassing TensorboardProgressBarWrapper and overwite _log_to_tensorboard.
Also, how can I make sure that the histogram values are only used in TB and not in stdout? Finally, is there support for custom progress bar or should I modify the train script as well?
Thank you very much