mirror of
https://github.com/wassname/DeepRL.git
synced 2026-10-30 12:50:27 +08:00
Major refactor
This commit is contained in:
1 parent
fb71f51ea7
commit
ce504e2d0f
28 files changed
+572
-375
No files matched your search
@@ -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