自学内容网 自学内容网

《PyTorch深度学习快速入门教程》学习笔记(第16周)

目录

摘要

abstract

1. Tensorboard的环境

2. Tensorboard 写日志

3. Tensorboard 读日志

4. Tensorboard 读图片


摘要

本周报的目的在于汇报《PyTorch深度学习快速入门教程》课程第二周的学习成果,主要聚焦于Tensorboard的使用以及其相关内容。

在这本周的学习中,课程内容主要涵盖了Tensorboard使用,包括等等。

本篇文章将对学习内容进行详细的阐述,并在最后部分对本周的学习内容进行总结。本周报旨在通过这种方式,将理论知识与实践应用有效地结合起来,为深度学习的基础内容学习与方向提供概括性总结。

abstract

The purpose of this weekly report is to present the learning outcomes of the first week of the PyTorch Deep Learning Quick Start Tutorial course, with a focus on the installation of the PyTorch runtime environment and its related content.

In this week's learning, the course content mainly covers the use of Tensorboard, including Tensorboard environment, Tensorboard log writing and reading, and so on.

This article will provide a detailed explanation of the learning content and summarize the learning content for this week in the final section. This weekly report aims to effectively combine theoretical knowledge with practical applications in this way, providing a summary of the basic content and direction of deep learning learning learning.

1. Tensorboard的环境

Tensorboad 可以用来查看loss是否按照我们预想的变化,或者查看训练到某一步输出的图像是什么样。

首先使用pip install tensorboard命令安装Tensorboard,然后引入SummaryWriter

2. Tensorboard 写日志

通过SummaryWriter()创建一个writer对象,参数为writer写的文件所在文件夹名。

产生的日志文件:

3. Tensorboard 读日志

在 Anaconda 终端里面,激活python环境,再输入  tensorboard --logdir=“日志文件所在目录”
命令,将网址赋值浏览器的网址栏,回车,即可查看tensorboard显示日志情况。

输入网址可得Tensorboard界面。

4. Tensorboard 读图片

使用writer.add_images()函数可在tensorboard中读入图片数据

通过上述读日志同样的操作可以读到写入的图片


原文地址:https://blog.csdn.net/qq_51339898/article/details/142897633

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!