I have a model with conv1d as the first layer. My data is time series data where each sample consists of 41 time steps where each time step has 4 features. I have about 1000 samples. I have specified the input shape of the conve1d layer to be (41,4) as it supposed to be. However, I keep getting the following error: Input 0 is incompatible with layer conv1d_48: expected ndim=3, found ndim=2.
I suspect that the problem is that the shape of X is (1000,) while the shape of X[0] is (41,4). Has anyone encountered this problem? Thanks.
l1=Input(shape=(41,4))
x=Conv1D(64,(4))(l1)
x=GlobalMaxPooling1D()(x)
x=Dense(1)(x)
model=Model(l1,x)
model.compile('rmsprop','binary_crossentropy',metrics=['acc'])
model.fit(X,y,32,10)
l1 = Input(shape=(41, 4))
– Vlad