当前位置:网站首页>[deep learning] pytorch uses tensorboard to visualize experimental data
[deep learning] pytorch uses tensorboard to visualize experimental data
2022-07-20 12:35:00 【The journey is bleak】
[1] Visual interface
First on the renderings :
[2] Use the tutorial
[2.1] install pytorch and tensorboard
Enter the command :
pip install torch
pip install tensorboard
[2.2] Used in code write
Code demo:
import numpy as np
from torch.utils.tensorboard import SummaryWriter # You can also use tensorboardX
# from tensorboardX import SummaryWriter # You can also use pytorch Integrated tensorboard
writer = SummaryWriter('log') # Configure the address where the generated data is saved
for epoch in range(100):
writer.add_scalar('test/squared', np.square(epoch), epoch)
writer.close()
After executing the above code, a logs file , And contains an event file .
[2.3] open tensorboard panel
stay pycharm in terminal The input terminal :
tensorboard --logdir=logs
Be sure to pay attention to the initial configuration of the generated file storage address , you are here terminal The address of the command in the terminal should be accessible !!!
After typing the command , Will generate an address , Just visit .
Pay attention to using Google browser to access . I use QQ browser ( Google kernel ) Some data can't be printed .
边栏推荐
- [golang learning notes 1.7] functions in golang should be used
- Style attribute operation of DOM series
- 腾讯大咖分享 | 腾讯Alluxio(DOP)在金融场景的落地与优化实践
- apt的学习
- Use of pH meter, conductivity meter and chlorophyll fluorescence meter
- Microservice - fusing and current limiting
- DOM events of DOM series
- Essential certificate for product manager!
- 《强化学习基础》1
- 信奥中的数学学习:小学、初高中数学 视频集
猜你喜欢
【虹科新闻】虹科电子与WEKA正式建立合作伙伴关系
Chinese synonymous sentence online converter - Chinese synonymous sentence converter software
【无标题】
A good product needs "emotional value"
优化案例2:select标量子查询且主查询排序
Spec206 detailed parameters and summary of common problems in the test process (with example operation)
Crontab execution time setting
Three layer switching technology
Software of synonymous sentence conversion online translator
EVO评估工具的使用
随机推荐
vulnhub Monitoring: 1
ES6 adds (I) let and constant
KVM deployment and Application
新闻速递 | 恭喜肖晓容工程师获得Domo专业认证!
How to apply neural network model to practice - mathematical modeling case of neural network model
【无标题】
[solution] the Monaco editor in leetcode cannot be loaded
Microservice - fusing and current limiting
上海证券开户安不安全?
Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process xxxx
P1087 [noip2004 popularity group question 3] FBI tree
Shuttle + Alluxio 加速内存Shuffle起飞
IPv6 basic
STL vector容量
SylixOS TCP 数据段发送流程简述
STL pair 常见构造方法及实例赏析
请问如果需要动态提交sql作业并控制启停等该如何实现?
【通信】【2】《宽带太赫兹通信技术》的笔记和一些简单的词汇的意思(误
广州证券开户安不安全?
Three leetcode questions corresponding to the basic knowledge of linked list (2)