<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>简单之美 &#187; Tag &#187; TensorBoard</title>
	<atom:link href="http://shiyanjun.cn/archives/tag/tensorboard/feed" rel="self" type="application/rss+xml" />
	<link>http://shiyanjun.cn</link>
	<description>简单之美，难得简单，享受简单的唯美。</description>
	<lastBuildDate>Wed, 04 Mar 2026 07:04:53 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.2</generator>
	<item>
		<title>PyTorch 使用 TensorBoard 实现可视化</title>
		<link>http://shiyanjun.cn/archives/2328.html</link>
		<comments>http://shiyanjun.cn/archives/2328.html#comments</comments>
		<pubDate>Fri, 26 Jan 2024 10:16:26 +0000</pubDate>
		<dc:creator><![CDATA[Yanjun]]></dc:creator>
				<category><![CDATA[PyTorch]]></category>
		<category><![CDATA[人工智能]]></category>
		<category><![CDATA[TensorBoard]]></category>

		<guid isPermaLink="false">http://shiyanjun.cn/?p=2328</guid>
		<description><![CDATA[<p>在 PyTorch 中使用 TensorBoard，可以实现样本数据、模型、训练过程的可视化，能够非常直观地查看在整个训练过程中产生的效果，方便分析和解决一些问题。本文完全根据 PyTorch 官方的 TensorBoard Tutorial 文档进行实践操作，体验 TensorBoard 的基本可视化功能。
首先，需要下载 tensorboard 模块：
这样就可以使用 TensorBoard 了，需要通过如下命令，启动 TensorBoard 服务：
上面 runs 目录是我们写数据的目录，可以根据自己的需要设置目录名称。在使用 PyTorch 过程中需要可视化的话，就把对应的数据写入到这个目录下面的指定文件中，TensorBoard 会直接从该目录下读取并进行可视化。
启动成功后，可以打开浏览器链接 http://localhost:6006/，查看 TensorBoard UI 界面。
我们向 runs 目录中写入数据，直接使用 torch.utils.tensorboard.SummaryWriter 就可以实现，所以先要创建可用的 SummaryWriter 对象，代码如下：
这样，就可以在 runs/fashion_mnist_experiment_2 下面为我们进行的一次可视化分析准备数据了，也可以通过指定不同的名称实现多次分析。
数</p>]]></description>
	<p>在 PyTorch 中使用 TensorBoard，可以实现样本数据、模型、训练过程的可视化，能够非常直观地查看在整个训练过程中产生的效果，方便分析和解决一些问题。本文完全根据 PyTorch 官方的 TensorBoard Tutorial 文档进行实践操作，体验 TensorBoard 的基本可视化功能。
首先，需要下载 tensorboard 模块：

pip3 install tensorboard

这样就可以使用 TensorBoard 了，需要通过如下命令，启动 TensorBoard 服务：

tensorboard --logdir=runs

上面 runs 目录是我们写数据的目录，可以根据自己的需要设置目录名称。在使用 PyTorch 过程中需要可视化的话，就把对应的数据写入到这个目录下面的指定文件中，TensorBoard 会直接从该目录下读取并进行可视化。
启动成功后，可以打开浏览器链接 http://localhost:6006/，查看 TensorBoard UI 界面。
我们向 runs 目录中写入数据，直接使用 torch.utils.tensorboard.SummaryWriter 就可以实现，所以先要创建可用的 SummaryWriter 对象，代码如下：

from torch.utils.tensorboard import SummaryWriter

writer = Summar</p>			<content:encoded><![CDATA[<p>在 PyTorch 中使用 TensorBoard，可以实现样本数据、模型、训练过程的可视化，能够非常直观地查看在整个训练过程中产生的效果，方便分析和解决一些问题。本文完全根据 PyTorch 官方的 TensorBoard Tutorial 文档进行实践操作，体验 TensorBoard 的基本可视化功能。
首先，需要下载 tensorboard 模块：
这样就可以使用 TensorBoard 了，需要通过如下命令，启动 TensorBoard 服务：
上面 runs 目录是我们写数据的目录，可以根据自己的需要设置目录名称。在使用 PyTorch 过程中需要可视化的话，就把对应的数据写入到这个目录下面的指定文件中，TensorBoard 会直接从该目录下读取并进行可视化。
启动成功后，可以打开浏览器链接 http://localhost:6006/，查看 TensorBoard UI 界面。
我们向 runs 目录中写入数据，直接使用 torch.utils.tensorboard.SummaryWriter 就可以实现，所以先要创建可用的 SummaryWriter 对象，代码如下：
这样，就可以在 runs/fashion_mnist_experiment_2 下面为我们进行的一次可视化分析准备数据了，也可以通过指定不同的名称实现多次分析。
数</p>]]></content:encoded>
			<wfw:commentRss>http://shiyanjun.cn/archives/2328.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
