Rewrite state/reward normalizer

This commit is contained in:
Shangtong Zhang committed 2018-04-06 11:36:44 -06:00
1 parent 4c6481d5be
commit 8dfe6ff7c8
23 files changed
+125 -926

No files matched your search

+5 -1
View File
@@ -15,4 +15,8 @@ class BaseAgent:
self.task.close()
def save(self, filename):
pass
torch.save(self.network.state_dict(), filename)
def load(self, filename):
state_dict = torch.load(filename, map_location=lambda storage, loc: storage)
self.network.load_state_dict(state_dict)