xfys's picture
Upload 645 files
47af768
raw
history blame contribute delete
448 Bytes
from torch.utils.tensorboard import SummaryWriter
import numpy as np
writer = SummaryWriter(comment='test_tensorboard')
for x in range(100):
writer.add_scalar('y=2x', x * 2, x)
writer.add_scalar('y=pow(2, x)', 2 ** x, x)
writer.add_scalars('/images', {"xsinx": x * np.sin(x),
"xcosx": x * np.cos(x),
"arctanx": np.arctan(x)}, x)
writer.close()