当前位置:网站首页>tensorboard多个events文件显示紊乱的解决办法
tensorboard多个events文件显示紊乱的解决办法
2022-07-26 15:29:00 【华为云】
在使用tensorboard可视化网络参数时,当因多次训练产生多个events文件后,在tensorboard上显示会非常混乱,非常不易于观察。如下图所示,这张图只有两次实验的文件,已经比较混乱了。
我之前的解决办法是每次跑都将以前的文件删除,保证路径下只有当前产生的events文件,但这样比较繁琐,特别是当需要调的参数变多的时候,每次删除不但很累,而且容易出错,后来受这篇文章的启发,既然保存在不同路径下就可以分别显示,那么将每次生成的events文件保存在不同的路径下即可,因此想到了使用时间戳作为路径名,在解决显示紊乱的同时还记录下了训练的时刻,一举两得。
from datetime import datetimeTIMESTAMP = "{0:%Y-%m-%dT%H-%M-%S/}".format(datetime.now())...train_log_dir = 'logs/train/' + TIMESTAMPtest_log_dir = 'logs/test/' + TIMESTAMPmegred = tf.summary.merge_all()with tf.Session() as sess: writer_train = tf.summary.FileWriter(train_log_dir,sess.graph) writer_test = tf.summary.FileWriter(test_log_dir) ...other code... writer_train.add_summary(summary_str_train,step) writer_test.add_summary(summary_str_test,step)其效果如下。
边栏推荐
- DICOM learning materials collection
- If food manufacturing enterprises want to realize intelligent and collaborative supplier management, it is enough to choose SRM supplier system
- FOC learning notes - coordinate transformation and simulation verification
- NAT/NAPT地址转换(内外网通信)技术详解【华为eNSP】
- sqlDeveloper工具快速入门
- PS + PL heterogeneous multicore case development manual for Ti C6000 tms320c6678 DSP + zynq-7045 (3)
- [leetcode daily question] - 268. Missing numbers
- In the changing era of equipment manufacturing industry, how can SCM supply chain management system enable equipment manufacturing enterprises to transform and upgrade
- 示波器的使用
- 深度学习中图像增强技术的综合综述
猜你喜欢

Creation and traversal of binary tree

Strengthen the defense line of ecological security, and carry out emergency drills for environmental emergencies in Guangzhou

TI C6000 TMS320C6678 DSP+ Zynq-7045的ZYNQ PS + PL异构多核案例开发手册(1)

gcc/g++与动静库以及gdb

持续集成(二)Jenkins基本使用介绍

使用verdaccio搭建自己的npm私有库

Cs224w (Figure machine learning) 2021 winter course learning notes 5

Interview with data center and Bi business (IV) -- look at the essence of ten questions
FTP协议

sklearn clustering聚类
随机推荐
企业数字化转型需要深入研究,不能为了转型而转型
How much help does solid state disk have for game operation
Continuous integration (II) introduction to the basic use of Jenkins
2023 catering industry exhibition, China catering supply chain exhibition and Jiangxi catering Ingredients Exhibition were held in February
【五分钟Paper】基于参数化动作空间的强化学习
USB转串口参数配置功能
Super simple! It only takes a few steps to customize the weather assistant for TA!!
anaconda No module named ‘cv2‘
03 common set security classes under JUC
关于我写的IDEA插件能一键生成service,mapper....这件事(附源码)
81.(cesium之家)cesium修改灰色背景(默认蓝色)
示波器的使用
线程和进程
【静态代码质量分析工具】上海道宁为您带来SonarSource/SonarQube下载、试用、教程
777. Exchange adjacent characters in LR string
Using two stacks to implement a queue
API 版本控制【 Eolink 翻译】
Zhaoqi science and technology innovation high-end talent project was introduced and implemented, mass entrepreneurship and innovation competition was organized, and online live roadshow was broadcast
cs224w(图机器学习)2021冬季课程学习笔记5
Unity URP entry practice