Closed huanpass closed 4 years ago
The transpose is just to take the state array from shape (32, 4, 84, 84)
, to (32, 84, 84, 4)
. The code could be programmed to work with either one, but in this case I decided to adopt (batch_size, height, width, stacked_frames)
as the norm.
(Copied from my Medium response)
In the class "replay buffer", i found there is "states = np.transpose(np.asarray(states), axes=(0, 2, 3, 1))" in the def get_minibatch. The problem is why transpose needed here? It looks like the original sequence is already correct so don't need transpose operation here.
Many thanks!