mirror of
https://github.com/wassname/DeepRL.git
synced 2026-09-09 11:13:47 +08:00
Major refactor
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import numpy as np
|
||||
|
||||
class Logger(object):
|
||||
def __init__(self, log_dir, vanilla_logger, skip=False):
|
||||
"""Create a summary writer logging to log_dir."""
|
||||
self.info = vanilla_logger.info
|
||||
self.debug = vanilla_logger.debug
|
||||
self.warning = vanilla_logger.warning
|
||||
self.skip = skip
|
||||
|
||||
def scalar_summary(self, tag, value, step):
|
||||
if self.skip:
|
||||
return
|
||||
|
||||
def image_summary(self, tag, images, step):
|
||||
if self.skip:
|
||||
return
|
||||
|
||||
def histo_summary(self, tag, values, step, bins=1000):
|
||||
if self.skip:
|
||||
return
|
||||
Reference in New Issue
Block a user