SAC Performance Fixes (#6295)

* SAC Performance Fixes

* Small Changes

* Update sac_model.py

* fix normalize wrapper

* Update test_eager_support.py

Co-authored-by: Eric Liang <ekhliang@gmail.com>
This commit is contained in:
Michael Luo
2019-12-20 10:51:25 -08:00
committed by Eric Liang
co-authored by Eric Liang
parent eca4cc7c00
commit 548df014ec
9 changed files with 230 additions and 54 deletions
+1 -4
View File
@@ -70,10 +70,7 @@ class ReplayBuffer(object):
@DeveloperAPI
def sample_idxes(self, batch_size):
return [
random.randint(0,
len(self._storage) - 1) for _ in range(batch_size)
]
return np.random.randint(0, len(self._storage), batch_size)
@DeveloperAPI
def sample_with_idxes(self, idxes):