当前位置:网站首页>visdom可视化实现与检查介绍
visdom可视化实现与检查介绍
2022-07-06 08:27:00 【MAR-Sky】
参考:https://blog.csdn.net/weixin_41010198/article/details/117853358、https://www.w3cschool.cn/article/86830765.html
安装使用
1、pip install visdom,或者使用conda安装visdom库
2、重要:前提是需要安装另外一个库,jsonpatch,否则会报错
3、启动visdom的服务,python -m visdom.server,确定环境,**关闭时**只要**关闭cmd启动命令窗口**就行
使用python -m visdom.server后
Checking for scripts.
Downloading scripts, this may take a little while
It's Alive!
INFO:root:Application Started
You can navigate to http://localhost:8097
然后在浏览器中输入http://localhost:8097查看显示内容
一个简单例子和界面上的显示设置
显示的整个步骤:
- 在对应的环境中启动服务,python -m visdom.server,得到能够访问的浏览器本地地址
- 将浏览器本地地址放入浏览器的地址栏
- 运行python的.py程序,
import visdom
import numpy as np
vis = visdom.Visdom()
vis.text('Hello, world!')
# vis.image(np.ones((3, 10, 10)))
x = list(range(10))
y = list(range(10))
# 使用line函数绘制直线 并选择显示坐标轴
vis.line(X=np.array(x), Y=np.array(y), opts=dict(showlegend=True))

多个环境显示
import visdom
import numpy as np
import torch
vis = visdom.Visdom(env='sin')
x = torch.arange(0, 100, 0.1)
y = torch.sin(x)
vis.line(X=x,Y=y,win='sin(x)',opts=dict(showlegend=True))
vis = visdom.Visdom(env='my_windows')
x = list(range(10))
y = list(range(10))
# 使用line函数绘制直线 并选择显示坐标轴
vis.line(X=np.array(x), Y=np.array(y), opts=dict(showlegend=True))
vis = visdom.Visdom(env='my_doub')
x = list(range(10))
y = list(range(10))
z = list(range(1,11))
vis.line(X=np.array(x), Y=np.column_stack((np.array(y), np.array(z))), opts=dict(showlegend=True))

从图像中看出,建立三个环境
visdom浏览器中的界面和编辑软件运行的配合使用

边栏推荐
- [research materials] 2021 Research Report on China's smart medical industry - Download attached
- From monomer structure to microservice architecture, introduction to microservices
- Erc20 token agreement
- Yyds dry goods inventory three JS source code interpretation eventdispatcher
- Fibonacci sequence
- 面向个性化需求的在线云数据库混合调优系统 | SIGMOD 2022入选论文解读
- Research Report on supply and demand and development prospects of China's high purity aluminum market (2022 Edition)
- Tidb backup and recovery introduction
- 从表中名称映射关系修改视频名称
- On the day of resignation, jd.com deleted the database and ran away, and the programmer was sentenced
猜你喜欢

Summary of phased use of sonic one-stop open source distributed cluster cloud real machine test platform

JVM 快速入门

2022.02.13 - NC002. sort

JS inheritance method

延迟初始化和密封类

【MySQL】锁

Pointer advanced --- pointer array, array pointer

Beijing invitation media

Circular reference of ES6 module
![[research materials] 2021 live broadcast annual data report of e-commerce - Download attached](/img/a6/74da2f44c7b6b22fed2f8e41a55988.jpg)
[research materials] 2021 live broadcast annual data report of e-commerce - Download attached
随机推荐
面向个性化需求的在线云数据库混合调优系统 | SIGMOD 2022入选论文解读
Hungry for 4 years + Ali for 2 years: some conclusions and Thoughts on the road of research and development
移位运算符
Tidb backup and recovery introduction
Chinese Remainder Theorem (Sun Tzu theorem) principle and template code
The resources of underground pipe holes are tight, and the air blowing micro cable is not fragrant?
【Nvidia开发板】常见问题集 (不定时更新)
On the inverse order problem of 01 knapsack problem in one-dimensional state
使用 BR 恢复 S3 兼容存储上的备份数据
sys. argv
How to use information mechanism to realize process mutual exclusion, process synchronization and precursor relationship
Research Report on Market Research and investment strategy of microcrystalline graphite materials in China (2022 Edition)
Introduction to number theory (greatest common divisor, prime sieve, inverse element)
China Light conveyor belt in-depth research and investment strategy report (2022 Edition)
China polyether amine Market Forecast and investment strategy report (2022 Edition)
Online yaml to CSV tool
JS pure function
Remote storage access authorization
Use br to back up tidb cluster data to S3 compatible storage
Bottom up - physical layer