Closed ghost closed 6 years ago
The object BatchEpisode
contains a batch of multiple episodes. The length of BatchEpisode
is the maximum length of each episode in the batch.
Thanks, I understand BatchEpisode
contains a batch of episodes , but why the length of BatchEpisode
is equals to len(self)
and is equals to the episode length?
@Andrewtor This code def __len__(self): return max(map(len, self._rewards_list))
overrides the original len()
method, and returns the max length of self._rewards_list
. :)
@fengredrum Got it, thank you so much!!!
What's the purpose of using
len(self)
in sampling, I'm confused since we have already provide batch_size. With thislen(self)
, sampled data's shape would be[len(self), batch_size, state_dim]
, which I can not understand.