ikostrikov/pytorch-a2c-ppo-acktr-gail

the usage of after_update in rollout storage

jiangsy opened this issue · 1 comments

what' the purpose of after_update in RolloutStorage to copy the last obs, states, etc to the first?
def after_update(self):
self.obs[0].copy_(self.obs[-1])
self.recurrent_hidden_states[0].copy_(self.recurrent_hidden_states[-1])
self.masks[0].copy_(self.masks[-1])
self.bad_masks[0].copy_(self.bad_masks[-1])

sorry for this stupid question, i understand its usage