mirror of
https://github.com/wassname/DeepRL.git
synced 2026-09-09 11:13:47 +08:00
Update utils
This commit is contained in:
@@ -59,3 +59,7 @@ class Config:
|
||||
self.test_interval = 0
|
||||
self.test_repetitions = 10
|
||||
self.evaluation_env = None
|
||||
|
||||
def merge(self, config_dict):
|
||||
for key in config_dict.keys():
|
||||
setattr(self, key, config_dict[key])
|
||||
|
||||
+4
-1
@@ -12,7 +12,10 @@ class ConstantSchedule:
|
||||
return self.val
|
||||
|
||||
class LinearSchedule:
|
||||
def __init__(self, start, end, steps):
|
||||
def __init__(self, start, end=None, steps=None):
|
||||
if end is None:
|
||||
end = start
|
||||
steps = 1
|
||||
self.inc = (end - start) / float(steps)
|
||||
self.current = start
|
||||
self.end = end
|
||||
|
||||
Reference in New Issue
Block a user