Skip to content

Commit 0457845

Browse files
committed
fix assert size for ddpg
1 parent 071e13f commit 0457845

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rl/agent/ddpg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,8 @@ def train_an_epoch(self):
253253

254254
# update memory, needed for PER
255255
errors = abs(np.sum(q_val - y, axis=1))
256-
assert y.shape == (self.batch_size, self.env_spec['action_dim'])
256+
# Q size is only 1, from critic
257+
assert y.shape == (self.batch_size, 1)
257258
assert errors.shape == (self.batch_size, )
258259
self.memory.update(errors)
259260

0 commit comments

Comments
 (0)