2
votes

I have my input state with shape = (84,84,4)

state = Input(shape=(84,84,4), dtype="float")

It's stacked sequence of continuous frames.

I want to pass this state to the keras model as input, firstly - to TimeDistributed layers and then - to LSTM

as I understand, time step is the first dimension and I need to reshape my state appropriately to

shape=(4, 84, 84)

and holds the frames in their own size and topology

1

1 Answers

4
votes
state_t=tf.transpose(state,[2,1,0])

Is this what you are looking for ?
(or [2,0,1] that depends on what you wanna do...)