visdom 0.1.8: Visdom python client failed to establish socket to get messages from the server.

详见原文:https://github.com/facebookresearch/visdom/issues/354

visdom.Visdom()

出现

'>' not supported between instances of 'float' and 'NoneType'

Visdom python client failed to establish socket to get messages from the server. This feature is optional and can be disabled by initializing Visdom with `use_incoming_socket=False`, which will prevent waiting for this request to timeout.

解决办法

vis = visdom.Visdom(use_incoming_socket=False)

示例:

import  visdom
import torch as t
vis = visdom.Visdom(use_incoming_socket=False)
x = t.arange(0,30,0.01)
y = t.sin(x)
vis.line(X=x,Y=y,win='sinx')

结果正常

猜你喜欢

转载自blog.csdn.net/weixin_40373414/article/details/82109760