My training data has the form (?,15) where ? is a variable length.
When creating my model I specify this:
inp = Input(shape=(None,15))
conv = Conv1D(32,3,padding='same',activation='relu')(inp)
...
My training data has the shape (35730,?,15).
Checking this in python I get:
X.shape
Outputs: (35730,)
X[0].shape
Outputs: (513, 15)
When I try to fit my model on my training data I get the ValueError:
Error when checking input: expected input_1 to have 3 dimensions, but got array with shape (35730, 1)
I can only train my model by using model.train_on_batch() on a single sample.
How can I solve this? It seems like keras thinks the shape of my input data is (35730, 1) when it actually is (35730, ?, 15)
Is this a bug in keras or did I do something wrong?
I am using the tensorflow backend if that matters. This is keras 2