显示图像
def add_scalar( self, tag, scalar_value, global_step=None, walltime=None, new_style=False, double_precision=False, ):tag (string): Data identifier #图片标题 scalar_value (float or string/blobname): Value to save # global_step (int): Global step value to record walltime (float): Optional override default walltime (time.time()) with seconds after epoch of event new_style (boolean): Whether to use new style (tensor field) or old style (simple_value field). New style could lead to faster data loading.
显示图片
def add_image(self, tag, img_tensor, global_step=None, walltime=None, dataformats='CHW'):tag (string): Data identifier 数据标识符(显示的图片名称) img_tensor (torch.Tensor, numpy.array, or string/blobname): Image data 图片数据(必须满足括号里的格式) global_step (int): Global step value to record 记录这是第几个子图 walltime (float): Optional override default walltime (time.time()) seconds after epoch of event 记录发生的时间 dataformats (string, optional): 图像数据的格式,默认为 ‘CHW’,即 Channel x Height x Width,即(C, H, W)