def __init__(self, env, cmdl):
super(VisdomMonitor, self).__init__(env)
self.freq = cmdl.report_freq # in steps
self.cmdl = cmdl
if self.cmdl.display_plots:
from visdom import Visdom
self.vis = Visdom()
self.plot = self.vis.line(
Y=np.array([0]), X=np.array([0]),
opts=dict(
title=cmdl.label,
caption="Episodic reward per 1200 steps.")
)
self.step_cnt = 0
self.ep_cnt = -1
self.ep_rw = []
self.last_reported_ep = 0
评论列表
文章目录