pytorch_pfn_extras.writing.TensorBoardWriter#

class pytorch_pfn_extras.writing.TensorBoardWriter(savefun=None, fs=None, out_dir='', stats=None, **kwds)#

Bases: object

Writer that sends statistics to TensorBoard.

This class contains a torch.utils.tensorboard.SummaryWriter object that is used to send the collected statistics to TensorBoard. A list of stats can be specified to report only the desired ones.

Parameters:
  • savefun (Optional[Callable[[...], None]]) – Ignored.

  • fs (Any) – Ignored.

  • out_dir (str) – Passed as log_dir argument to SummaryWriter.

  • stats (list) – List of statistic keys.

  • kwds (Any) – Passed as an additional arguments to SummaryWriter.

Methods

__init__([savefun, fs, out_dir, stats])

finalize()

__call__(filename, out_dir, target, *, savefun=None, append=False)#

Sends the statistics to the TensorBoard.

Parameters:
  • filename (str) – Ignored.

  • out_dir (str) – Ignored.

  • target (dict or list) – The statistics of the iteration. If given as a list, only the last element (assumed to be a dict containing the latest iteration statistics) is reported.

  • savefun (Optional[Callable[[...], None]]) – Ignored.

  • append (bool) – Ignored.

Return type:

None

__init__(savefun=None, fs=None, out_dir='', stats=None, **kwds)#
Parameters:
  • savefun (Optional[Callable[[...], None]]) –

  • fs (Optional[Any]) –

  • out_dir (str) –

  • stats (Optional[KeysView[str]]) –

  • kwds (Any) –

Return type:

None

finalize()#
Return type:

None