예제 #1
0
파일: dope.py 프로젝트: jxzhangjhu/DOPE
    def reallocate_replay_pool(self, new_size: int) -> None:
        """Reset buffer

        Args:
            new_size (int): new maximum buffer size. 
        """
        assert new_size != self.replay_pool.capacity, "Error, you've tried to allocate a new pool which has the same length"
        new_replay_pool = ReplayPool(capacity=new_size)
        new_replay_pool.initialise(self.replay_pool)
        self.replay_pool = new_replay_pool
예제 #2
0
 def reallocate_replay_pool(self, new_size: int):
     assert new_size != self.replay_pool.capacity, "Error, you've tried to allocate a new pool which has the same length"
     new_replay_pool = ReplayPool(capacity=new_size)
     new_replay_pool.initialise(self.replay_pool)
     self.replay_pool = new_replay_pool