Dimensional Error

Hello Everyone,
I am implementing a hybrid model which is autoencoder and CNN. I am attaching an image of my error which says I am not giving the dimension to my CNN proper. Please help me out to understand what can I do to get rid of this error. I am using Pytorch to implement the above models.

@harshini_sewani Can you paste your model along with the input shapes to precisely figure out what’s going on?

Thanks! Can you also provide your fc_encoder definition?

1 Like


The issue is that assuming an input x of shape (N,1,H_in) is fed to your fc_encoder, you get an output of shape (N,1,H_out). This shape is then feasible to be fed into your Conv1d layer. However, it seems the shape of the tensor being fed into this layer is [1, 4975]. So, please ensure your input is shaped (N, 1, H_in).

Can you please explain me what is use of batch normalization and evolving normalization-activation layer ?

How can i reshape it ?