def __init__(self, plot_type, fields=None, win=None, env=None, opts={}, port=8097):
'''
Args:
fields: Currently unused
plot_type: The name of the plot type, in Visdom
Examples:
>>> # Image example
>>> img_to_use = skimage.data.coffee().swapaxes(0,2).swapaxes(1,2)
>>> image_logger = VisdomLogger('image')
>>> image_logger.log(img_to_use)
>>> # Histogram example
>>> hist_data = np.random.rand(10000)
>>> hist_logger = VisdomLogger('histogram', , opts=dict(title='Random!', numbins=20))
>>> hist_logger.log(hist_data)
'''
super(VisdomLogger, self).__init__(fields, win, env, opts, port)
self.plot_type = plot_type
self.chart = getattr(self.viz, plot_type)
self.viz_logger = self._viz_prototype(self.chart)
评论列表
文章目录