The first layer of my network is a Conv1D as follows:
Conv1D(128, 9, activation='relu', input_shape=(100, 28))
My input data consists of elements with input shape (100, 28). i.e. My dataset consists of n of these elements, each with a label. The labels are one-shot arrays of length 15.
The output of .element_spec on my dataset gives:
(TensorSpec(shape=(100, 28), dtype=tf.float32, name=None),
TensorSpec(shape=(15,), dtype=tf.int32, name=None))
This looks consistent but running .fit() on the model gives this error:
Error when checking input: expected conv1d_18_input to have 3 dimensions, but got array with shape (100, 28)
What am I doing wrong here? BTW, this is TensorFlow 2.0.
Edit: If I step through the tf code, it seems it is expecting (None, 100, 28), but that seems wrong to me. Each element presented to the layer is (100, 28). The "None" surely just represents that it is called many times. Also, you can't specify (None, 100, 28) as input_shape for the layer or it complains it only wants two dimensions, not three!
Many thanks,
Julian