当前位置:网站首页>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浏览器中的界面和编辑软件运行的配合使用
边栏推荐
- PLT in Matplotlib tight_ layout()
- Convolution, pooling, activation function, initialization, normalization, regularization, learning rate - Summary of deep learning foundation
- JS inheritance method
- Vocabulary notes for postgraduate entrance examination (3)
- pcd转ply后在meshlab无法打开,提示 Error details: Unespected eof
- China vanadium battery Market Research and future prospects report (2022 Edition)
- Nacos Development Manual
- Yyds dry goods inventory three JS source code interpretation eventdispatcher
- JS pure function
- Online yaml to CSV tool
猜你喜欢
[MySQL] lock
Configuring OSPF load sharing for Huawei devices
Hungry for 4 years + Ali for 2 years: some conclusions and Thoughts on the road of research and development
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
2022 Inner Mongolia latest construction tower crane (construction special operation) simulation examination question bank and answers
【ROS】usb_cam相机标定
From monomer structure to microservice architecture, introduction to microservices
[MySQL] log
Chinese Remainder Theorem (Sun Tzu theorem) principle and template code
2022 Inner Mongolia latest water conservancy and hydropower construction safety officer simulation examination questions and answers
随机推荐
VMware 虚拟化集群
JVM performance tuning and practical basic theory - Part 1
What is CSRF (Cross Site Request Forgery)?
Image fusion -- challenges, opportunities and Countermeasures
Restore backup data on S3 compatible storage with tidb lightning
Cisp-pte practice explanation
[MySQL] database stored procedure and storage function clearance tutorial (full version)
LDAP应用篇(4)Jenkins接入
3. File operation 3-with
Fibonacci sequence
Pyqt5 development tips - obtain Manhattan distance between coordinates
Colorlog结合logging打印有颜色的日志
按位逻辑运算符
化不掉的钟薛高,逃不出网红产品的生命周期
Research Report on supply and demand and development prospects of China's high purity aluminum market (2022 Edition)
[MySQL] lock
Online yaml to CSV tool
MySQL learning record 10getting started with JDBC
备份与恢复 CR 介绍
Upgrade tidb with tiup