I am new to CNN, RNN and deep learning. I am trying to make architecture that will combine CNN and RNN. input image size = [20,3,48,48] a CNN output size = [20,64,48,48] and now i want cnn ouput to be RNN input but as I know the input of RNN must be 3-dimension only which is [seq_len, batch, input_size] How can I make 4-dimensional [20,64,48,48] tensor into 3-dimensional for RNN input?
and another question how do I initiate the first hidden state with
torch.zeros()
I don't know what exact information I should pass in this function. the only thing that I know it is
[layer_dim, batch, hidden_dim]
Thank you.