在训练神经网络时有时需要开启visdom,否则遇到如下提示:
代码语言:javascript复制requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8097): Max retries exceeded with url: /env/main (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000
19B93886588>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',))
安装visdom
pip安装:
代码语言:javascript复制pip install visdom
conda安装:
代码语言:javascript复制# 任选其一即可
conda install -c conda-forge visdom
conda install -c conda-forge/label/gcc7 visdom
conda install -c conda-forge/label/cf201901 visdom
conda install -c conda-forge/label/cf202003 visdom
启动visdom
使用命令:
代码语言:javascript复制python -m visdom.server
观察到:
代码语言:javascript复制Checking for scripts.
It's Alive!
INFO:root:Application Started
You can navigate to http://localhost:8097
说明启动成功,即可访问http://localhost:8097。