visdom&tensorBoardX可视化

2019-05-21  本文已影响0人  delta1037

acc,loss曲线的可视化


visdom

$ pip install visdom
$ python -m visdom.server
import visdom
vis = visdom.Visdom(env='model_env')

多曲线可视化(loss,acc)

vis.line(Y=np.column_stack(np.array([train_loss, train_acc,test_acc])),
            X=np.column_stack(np.array([epoch + 1, epoch + 1, epoch + 1])),
            win='main',
            update='append')

tensorboardX

$ pip install tensorboardX
from tensorboardX import SummaryWriter
writer = SummaryWriter('/path/to/log')

多曲线可视化(loss, acc)

 writer.add_scalars('data/group', {'test_loss':loss_vue, 'test_acc':acc_vue}, train_step)
上一篇下一篇

猜你喜欢

热点阅读