pytorch-visdom

远程实时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)))
    )

    原文作者:Nick.Zxx
    原文地址: https://zhuanlan.zhihu.com/p/36167105
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞