def handler(image, index, state): writer = tb.get_writer(log_dir, _to_visdom, visdom=True, visdom_params=visdom_params) writer.add_image( name.format(index=str(index)) + '_' + str(state[torchbearer.EPOCH]), image.clamp(0, 1), state[torchbearer.EPOCH]) tb.close_writer(log_dir, _to_visdom)
def handler(image, index, state): writer = tb.get_writer(log_dir, _to_tensorboard) writer.add_image(name.format(index=str(index)), image.clamp(0, 1), state[torchbearer.EPOCH]) tb.close_writer(log_dir, _to_tensorboard)