远程实时loss
import visdom
vis = visdom.Visdom()
try:
win = vis.line(
Y=np.column_stack(([loss], [valid_loss])),
X=np.column_stack((np.arange(epoch - 1, epoch), np.arange(epoch - 1, epoch))),
win=win,
update='append'
)
except:
win = vis.line(
Y=np.column_stack(([loss], [valid_loss])),
X=np.column_stack((np.arange(epoch - 1, epoch), np.arange(epoch - 1, epoch)))
)