当前位置:网站首页>visdom画多条动态损失曲线
visdom画多条动态损失曲线
2022-06-23 03:58:00 【andrew P】
from visdom import Visdom
from time import sleep
'''
以这三条曲线为例:
y = 80*x
y = x**2
y = -100*x-100
'''
viz = Visdom()
x = []
Yn =[]
opts1 = {
"title": 'chart example1',
"xlabel":'x',
"ylabel":'y',
"width":500,
"height":300,
"legend":['b','c','d']
}
opts2 = {
"title": 'chart example2',
"xlabel":'x',
"ylabel":'y',
"width":500,
"height":300,
"legend":['b','c','d']
}
for i in range(1000):
x.append(i)
Yn.append([i*80, i**2, -i*100-100])
##方式一,replace
viz.line(X=x, Y=Yn, win='chart1',env='dynamic', opts=opts1)
##方式二,append
viz.line(X=[i], Y=[[i * 80, i ** 2, -i * 100 - 100]], win='chart2', env='dynamic',update='append',
opts=opts2)
sleep(0.01)
边栏推荐
- STC 32-bit 8051 MCU development example tutorial I development environment construction
- JDBC入门学习(四)之Druid连接池的使用
- Go 分组 & 排序
- Webrtc[47] - a common way for webrtc to save YUV data
- GO语言-自定义error
- App hangs~
- About information disclosure and defense
- Jenkins installs and deploys and automatically builds and publishes jar applications
- 关于DOS/DDOS攻击和防御
- fastjson中的@JSONField注解
猜你喜欢

konva 系列教程 1:konva 是什么?

The road of architects starts from "storage selection"

App automated test appium advanced

Is there a real part-time job online? How do college students find part-time jobs in summer?

Fs2119a Synchronous Boost IC output 3.3V and fs2119b Synchronous Boost IC output 5V

Design and implementation of spark offline development framework

Spark 离线开发框架设计与实现

Export PDF with watermark

Un processus GC complet pour le principe JVM

英文字母pc是什么意思,互联网的pc指的是什么
随机推荐
关于DOS/DDOS攻击和防御
MCS: discrete random variable Bernoulli distribution
Win11应用商店一直转圈解决办法
Array The from method creates an undefined array of length n
Introduction to JDBC (III) implementation of transaction rollback function
Introduction to JDBC (I) DML operation
QT QWidget nesting relative position acquisition (QT drawing nesting)
弱者易怒如虎,强者平静如水,真正厉害的人早已戒掉了情绪
99 multiplication table bat
今日睡眠质量记录80分
[leetcode] longest increasing subsequence problem and its application
fastjson中的@JSONField注解
Go 分组 & 排序
软件设计开发笔记2:基于QT设计串口调试工具
Introduction to MySQL (I) grammar
Seata四大模式之XA模式详解及代码实现
云原生大趋势下的容器化技术现状与发展
Go grouping & sorting
数据库连接异常:create connection error, url: jdbc:mysql://ip/数据库名, errorCode 0, state 08S01问题处理
Introduction to unityshader -- rendering optimization technology in unity (IV)