(self, capacity, frame_shape=(84, 84), stack=4)
| 60 | cutting RAM ~4x vs. storing the full stack per slot.""" |
| 61 | |
| 62 | def __init__(self, capacity, frame_shape=(84, 84), stack=4): |
| 63 | self.capacity = capacity |
| 64 | self.stack = stack |
| 65 | self.frames = np.zeros((capacity, *frame_shape), dtype=np.uint8) |
| 66 | self.actions = np.zeros(capacity, dtype=np.int64) |
| 67 | self.rewards = np.zeros(capacity, dtype=np.float32) |
| 68 | self.dones = np.zeros(capacity, dtype=np.float32) |
| 69 | self.idx = 0 |
| 70 | self.size = 0 |
| 71 | |
| 72 | def push(self, frame, action, reward, done): |
| 73 | self.frames[self.idx] = frame |
nothing calls this directly
no outgoing calls
no test coverage detected