from torch.utils.tensorboard import SummaryWriter writer = SummaryWriter('logs') # writer.add_image() #y = x for i in range(100): writer.add_scalar('y = x', i, i) writer.close()
port用于修改端口 开始logs路径错了,所以打开没有图片,修正成正确相对路径后,可以显示