How to connect a convolutional 1d layer to lstm layers


#1

Hello. I’m trying to experiment with connecting a convolutional 1d layer to lstm layers. How would I begin doing so? This is what I’ve been trying, and it gave me a “Input 0 is incompatible with layer Convolution1D: expected ndim=3, found ndim=2” error.

This is my data tab.


#2

Hi
you are getting this error because of the wrong input dimension.
Conv1d requires 3 dimension.
Extra dimension for filters so reshape your input to (32100,1) using reshape block available in DLS.

Regards
Rajat


#3

Thanks. But I thought convo1d was for 1 dimensional input?


#4

Also, when I added a reshape layer to the beginning like you said, it now freezes at the “connected to compute server” stage. The bar charts are still running, but it doesn’t progress to the next stages.


#5

Yes it should be 1 dim but the extra dim is for filters.
Like in 2D conv input size should be (X,Y,no of channel)

Regards
Rajat


#6

Hi the reason for that might be out of memory error.
So please check the DLS logs and let me know the error.

Regards
Rajat