未验证 提交 cb3508e4 编写于 作者: 走神的阿圆's avatar 走神的阿圆 提交者: GitHub

add histogram demo. (#675)

上级 2f829cd1
......@@ -20,8 +20,11 @@ import numpy as np
if __name__ == '__main__':
values = np.arange(0, 1000)
with LogWriter(logdir="./log/histogram_test/train") as writer:
for index in range(5):
writer.add_histogram(tag='default1',
values=values+index,
for index in range(1, 101):
interval_start = 1 + 2 * index / 100.0
interval_end = 6 - 2 * index / 100.0
data = np.random.uniform(interval_start, interval_end, size=(10000))
writer.add_histogram(tag='default tag',
values=data,
step=index,
buckets=10)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册