disable pytype for n-step replay

This commit is contained in:
Antonin RAFFIN 2020-08-29 17:48:31 +02:00
parent dfcff73c5a
commit 826b2250f4

View file

@ -463,7 +463,7 @@ class NstepReplayBuffer(ReplayBuffer):
# Memory inneficient version but fast computation
self.log_probs[unique_indices] = log_prob.cpu().numpy().flatten()
# Add entropy term, only for n-step > 1
rewards[:, 1:] = rewards[:, 1:] - self.ent_coef * self.log_probs[indices[:, 1:]]
rewards[:, 1:] = rewards[:, 1:] - self.ent_coef * self.log_probs[indices[:, 1:]] # pytype: disable=attribute-error
# we filter through the indices.
# The immediate indice, i.e. col 0 needs to be 1, so we ensure that it is here using np.ones