当前位置:网站首页>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浏览器中的界面和编辑软件运行的配合使用
边栏推荐
- egg. JS getting started navigation: installation, use and learning
- Remote storage access authorization
- Permutation and combination function
- hcip--mpls
- Bottom up - physical layer
- Restore backup data on S3 compatible storage with tidb lightning
- 从 CSV 文件迁移数据到 TiDB
- IOT -- interpreting the four tier architecture of the Internet of things
- Vocabulary notes for postgraduate entrance examination (3)
- egg. JS project deployment online server
猜你喜欢
随机推荐
Remote storage access authorization
Huawei cloud OBS file upload and download tool class
VMware virtualization cluster
Hcip day 16
Beijing invitation media
Browser thread
Modify the video name from the name mapping relationship in the table
ROS编译 调用第三方动态库(xxx.so)
Summary of phased use of sonic one-stop open source distributed cluster cloud real machine test platform
All the ArrayList knowledge you want to know is here
面向个性化需求的在线云数据库混合调优系统 | SIGMOD 2022入选论文解读
JVM performance tuning and practical basic theory - Part 1
2022 Inner Mongolia latest water conservancy and hydropower construction safety officer simulation examination questions and answers
[secretly kill little partner pytorch20 days -day01- example of structured data modeling process]
【Nvidia开发板】常见问题集 (不定时更新)
Leetcode question brushing (5.28) hash table
Zhong Xuegao, who cannot be melted, cannot escape the life cycle of online celebrity products
Synchronized solves problems caused by sharing
C language custom type: struct
Colorlog combined with logging to print colored logs