Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions tensorboardX/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,25 @@ def add_text(self, tag, text_string, global_step=None):
"""
self.file_writer.add_summary(text(tag, text_string), global_step)

def add_text_dict(self, tag, d, global_step=None):
"""Add dictionary as text to summary.

Args:
tag (string): Data identifier
d (dictionary): Key value pairs to print
global_step (int): Global step value to record

Examples::

writer.add_text('parameters', params, 0)
"""

text_string = ""
for key, value in d.items():
text_string += "\t" + str(key) + ": " + str(value) + "\n"

self.file_writer.add_summary(text(tag, text_string), global_step)

def add_graph_onnx(self, prototxt):
self.file_writer.add_graph_onnx(gg(prototxt))

Expand Down