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 -2
View File
@@ -152,8 +152,7 @@ class ProximalPolicyOptimization:
self.shared_network.zero_grad()
self.actor_opt.zero_grad()
self.critic_opt.zero_grad()
for param, worker_param in zip(self.shared_network.parameters(), self.worker_network.parameters()):
param._grad = worker_param.grad.clone()
sync_grad(self.shared_network, self.worker_network)
self.actor_opt.step()
self.critic_opt.step()