def tb_add_histogram(experiment, name, wall_time, step, histo):
# Tensorflow does not support key being unicode
histo_string = {}
for k,v in histo.items():
histo_string[str(k)] = v
histo = histo_string
writer = tb_get_xp_writer(experiment)
summary = tf.Summary(value=[
tf.Summary.Value(tag=name, histo=histo),
])
event = tf.Event(wall_time=wall_time, step=step, summary=summary)
writer.add_event(event)
writer.flush()
tb_modified_xp(experiment, modified_type="histograms", wall_time=wall_time)
# Perform requests to tensorboard http api
评论列表
文章目录