当前位置:网站首页>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浏览器中的界面和编辑软件运行的配合使用
边栏推荐
- The resources of underground pipe holes are tight, and the air blowing micro cable is not fragrant?
- Use Alibaba icon in uniapp
- Hill sort c language
- Migrate data from CSV files to tidb
- sys.argv
- 被破解毁掉的国产游戏之光
- egg. JS project deployment online server
- Image fusion -- challenges, opportunities and Countermeasures
- Beijing invitation media
- MySQL learning records 12jdbc operation transactions
猜你喜欢
ROS编译 调用第三方动态库(xxx.so)
[MySQL] database stored procedure and storage function clearance tutorial (full version)
vulnhub hackme: 1
ESP series pin description diagram summary
Chrome浏览器的crash问题
根据csv文件某一列字符串中某个数字排序
3. File operation 3-with
ESP系列引脚說明圖匯總
On the day of resignation, jd.com deleted the database and ran away, and the programmer was sentenced
Leetcode question brushing (5.28) hash table
随机推荐
Hcip day 16
Migrate data from SQL files to tidb
leetcode刷题 (5.28) 哈希表
The resources of underground pipe holes are tight, and the air blowing micro cable is not fragrant?
JS native implementation shuttle box
Upgrade tidb with tiup
LDAP Application Section (4) Jenkins Access
Modify the video name from the name mapping relationship in the table
Nacos Development Manual
leetcode刷题 (5.29) 哈希表
Résumé des diagrammes de description des broches de la série ESP
【ROS】usb_cam相机标定
Analysis of Top1 accuracy and top5 accuracy examples
Analysis of pointer and array written test questions
2022.02.13 - NC001. Reverse linked list
leetcode刷题 (5.31) 字符串
【MySQL】日志
VMware 虚拟化集群
Leetcode question brushing (5.31) string
Report on Market Research and investment prospects of China's silver powder industry (2022 Edition)