d3rlpy.dataset.FrameStackTransitionPicker¶
- class d3rlpy.dataset.FrameStackTransitionPicker(n_frames)[source]¶
Frame-stacking transition picker.
This class implements the frame-stacking logic. The observations are stacked with the last
n_frames-1
frames. Whenindex
specifies timestep belown_frames
, those frames are padded by zeros.episode = Episode( observations=np.random.random((100, 1, 84, 84)), actions=np.random.random((100, 2)), rewards=np.random.random((100, 1)), terminated=False, ) frame_stacking_picker = FrameStackTransitionPicker(n_frames=4) transition = frame_stacking_picker(episode, 10) transition.observation.shape == (4, 84, 84)
- Parameters:
n_frames (int) – Number of frames to stack.
Methods