当前位置:网站首页>Using pytorch's tensorboard visual deep learning indicators | pytorch series (25)
Using pytorch's tensorboard visual deep learning indicators | pytorch series (25)
2022-07-28 02:53:00 【51CTO】
writing |AI_study

The original title :TensorBoard With PyTorch - Visualize Deep Learning Metrics
At this point in the series , We have just completed the network operation during the training . Now? , We hope to get more indicators about this process , To better understand the situation behind the scenes .
A bird's-eye view of where we are in the training process .
- Prepare the data
- Build a model
- Training models
- Analysis of the results of the model
- Use for this TensorBoard
TensorBoard:TensorFlow Visual toolkit for
TensorBoard It provides the visualization and tools for machine learning experiments :
- Tracking and visualization indicators , Such as loss and accuracy
- Visual model diagram ( Operation and layer )
- See the weight , Histograms of deviations or other tensors over time
- take embedding Project to a lower dimensional space
- Display images , Text and audio data
- analysis TensorFlow Program
- And more
from PyTorch 1.1.0 version ,PyTorch Added a tensorboard Utility packages , So that we can TensorBoard And PyTorch Use it together .
by PyTorch install TensorBoard
for PyTorch install TensorBoard, Please perform the following steps :
- Confirm that you are running PyTorch edition 1.1.0 Or later .
- Confirm that you are running TensorBoard 1.15 Or later .
- Please note that ,PyTorch The use of TensorBoard And for TensorFlow Created TensorBoard identical . Use the following command to check the TensorBoard Version of :
4. Use the following command to install TensorBoard.
- Once installed TensorBoard 1.15 Or later , We can start !
Please note that ,PyTorch Document theory TensorBoard edition 1.14 It's necessary .
PyTorch Of TensorBoard introduction
TensorBoard It's at the end of a font Web Interface , Actually read the data from the file and display it . To use TensorBoard, Our task is to save the data we want to display to TensorBoard Can read the file .
In order to make us more relaxed ,PyTorch Created a new one called SummaryWriter Utility classes for . To access this class , We use the following import :
After importing this class , We can create instances of this class , It is then used to get data from the program to the file system , Then from TensorBoard To use .
Network diagram and training set image
SummaryWriter Class has many methods , We can call these methods to selectively select and select what we want TensorBoard Available data . First , We deliver the network and a batch of images to the writers .
The code for TensorBoard Create a file called tb Of SummaryWriter example . then , Create our PyTorch Examples of the Internet , And from our PyTorch Decompress a batch of images and labels in the data loader object .
then , Add images and networks to TensorBoard In the file to be used . actually , It can be said that network diagram and image batch Have been added to TensorBoard in .
function TensorBoard
To start the TensorBoard, We need to run on the terminal tensorboard command . This will start a local server , The server will be TensorBoard UI And our SummaryWriter Data written to disk provides services .
By default ,PyTorch SummaryWriter Object writes data to a file named ./runs Disk in the directory of .
When running tensorboard On command , We pass a parameter to tell tensorboard Where is the data . Just like this. :
TensorBoard The server will start and is listening on port 6006 Upper http request . These details will be displayed in the console .
Access by browsing to TensorBoard UI:
ad locum , We will be able to see our network diagram and image data . at present , This really provides us with visual effects , But not as useful as the next .
TensorBoard Histogram and scalar
We can add to TensorBoard The next data import type of is digital data . We can add over time or epoch Scalar value displayed . We can also add values to the histogram to see the frequency distribution of values .
To add scalars and histograms , We use PyTorch SummaryWriter Class .
This is an example of a call :
This is an example , It shows how to put these calls in the training loop :
This adds these values to TensorBoard in . These values are even updated in real time during network training .
It is helpful to look at the loss and accuracy values over time . however , We may need to admit , It doesn't really need to be TensorBoard.
TensorBoard The real function of is that it has many functions of running out of the box . This enables us to quickly conduct experiments by changing the hyperparametric values and comparing runs , To see which parameters are most effective .
The content of the article is carefully studied , My level is limited , Translation cannot be perfect , But it really took a lot of effort , I hope you can move your sexy hands , Share a circle of friends , Support me ^_^
The original English link is :
https://deeplizard.com/learn/video/pSexXMdruFM




边栏推荐
- [TA frost wolf \u may - hundred people plan] Figure 3.7 TP (d) r architecture of mobile terminal
- Arm32进行远程调试
- [wechat applet development (VI)] draw the circular progress bar of the music player
- Digital twin agriculture - Smart agriculture rice processing plant has changed from "watching the sky to eat" to "knowing the sky to work"
- 第二季度邮件安全报告:邮件攻击暴增4倍,利用知名品牌获取信任
- Eigenvalues and eigenvectors
- 【TA-霜狼_may-《百人计划》】图形3.7 移动端TP(D)R架构
- MySQL blocking monitoring script
- pytest最好的测试框架
- Interpretation of cesium3dtilesets using customshader and examples of Omni effects
猜你喜欢

unordered_map的hash function及hash bucket存储方式探索

Docker高级篇-Docker容器内Redis集群配置

ERD online 4.0.0 free private deployment scheme

AWS elastic three swordsman

mysql 如图所示,现有表a,表b,需求为 通过projectcode关联a、b表,查出address不同的 idcardnum。

Maskedauutoencoders visual learner cvpr2022

Deep residual learning for image recognition shallow reading and Implementation

retainface使用报错:ModuleNotFoundError: No module named 'rcnn.cython.bbox'

Should programmers choose outsourcing companies

Redis aof日志持久化
随机推荐
[tutorial of using idea] shortcut key of idea
Retainface use error: modulenotfounderror: no module named'rcnn.cyton.bbox'
Maskedauutoencoders visual learner cvpr2022
P6118 [joi 2019 final] solution to the problem of Zhenzhou City
On the problem that sqli labs single quotation marks do not report errors
特征值和特征向量
Canonical Address
第二季度邮件安全报告:邮件攻击暴增4倍,利用知名品牌获取信任
Center Based 3D object detection and tracking (centerpoint) paper notes
IO flow: node flow and processing flow are summarized in detail.
怎么简单实现菜单拖拽排序的功能
Should programmers choose outsourcing companies
Typescript (zero) -- introduction, environment construction, first instance
[signal processing] weak signal detection in communication system based on the characteristics of high-order statistics with matlab code
新基建助力智能化道路交通领域的转型发展
[ACNOI2022]总差一步
【英雄哥七月集训】第 26天:并查集
tfx airflow 使用体验
Why is there no unified quotation for third-party testing fees of software products?
入职华为od一个月的感受