千家信息网

Pytorch中怎么利用tensorboard创建SummaryWriter对象

发表于:2025-02-02 作者:千家信息网编辑
千家信息网最后更新 2025年02月02日,这篇文章将为大家详细讲解有关Pytorch中怎么利用tensorboard创建SummaryWriter对象,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了
千家信息网最后更新 2025年02月02日Pytorch中怎么利用tensorboard创建SummaryWriter对象

这篇文章将为大家详细讲解有关Pytorch中怎么利用tensorboard创建SummaryWriter对象,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。

使用方式

torch.utils.tensorboard.writer.SummaryWriter(        log_dir=None,         comment='',         purge_step=None,         max_queue=10,         flush_secs=120,         filename_suffix='')
from torch.utils.tensorboard import SummaryWriter# create a summary writer with automatically generated folder name.writer = SummaryWriter()# folder location: runs\Dec10_22-22-11_chenxuqi-desktop# create a summary writer using the specified folder name.writer = SummaryWriter("my_experiment")# folder location: my_experiment# create a summary writer with comment appended.writer = SummaryWriter(comment="LR_0.1_BATCH_16")# folder location: runs\Dec10_22-22-14_chenxuqi-desktopLR_0.1_BATCH_16

运行结果:

关于Pytorch中怎么利用tensorboard创建SummaryWriter对象就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。

0