Refactor DDPG

This commit is contained in:
Shangtong Zhang committed 2018-04-25 23:38:17 -06:00
1 parent ceea0a474b
commit 2eefb04b9d
2 files changed
+4 -7

No files matched your search

+2
View File
@@ -18,6 +18,8 @@ class BaseNet:
self.to(self.device)
def tensor(self, x):
if isinstance(x, torch.Tensor):
return x
x = torch.tensor(x, device=self.device, dtype=torch.float32)
return x