mirror of
https://github.com/wassname/DeepRL.git
synced 2026-10-08 11:39:05 +08:00
Rewrite state/reward normalizer
This commit is contained in:
1 parent
4c6481d5be
commit
8dfe6ff7c8
23 files changed
+125
-926
No files matched your search
+5
-1
@@ -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)
|
||||
Reference in new issue
Block a user