Major update

This commit is contained in:
Shangtong Zhang
2017-11-11 20:52:57 -07:00
parent 8c197e183c
commit c1fdb1bd2f
17 changed files with 48 additions and 199 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
from .config import *
from .normalizer import *
from .run import *
from .misc import *
try:
from .tf_logger import Logger
+1
View File
@@ -48,3 +48,4 @@ class Config:
self.min_epsilon = 0
self.save_interval = 0
self.max_steps = 0
self.success_threshold = float('inf')
+5 -1
View File
@@ -50,4 +50,8 @@ def run_episodes(agent):
if avg_reward > agent.task.success_threshold:
break
return steps, rewards, avg_test_rewards
return steps, rewards, avg_test_rewards
def sync_grad(target_network, src_network):
for param, src_param in zip(target_network.parameters(), src_network.parameters()):
param._grad = src_param.grad.clone()