Input Shape For 1d Cnn (keras)
I'm building a CNN using Keras, with the following Conv1D as my first layer: cnn.add(Conv1D( filters=512, kernel_size=3, strides=2, activation=hyperparameters['acti
Solution 1:
So I set the input_shape to (1000, 1)
I also converted the input that's fed to fit() into a single ndarray of n ndarrays (each ndarray is a vector of 1000 floats, n is the total count of samples/vectors) and reshaped each of those ndarrays to (1, 1000, 1) during preprocessing after reading this explanation on inputs & input shape
The final shape of my input data was (15641, 1000, 1)
All of this should apply to validation data too (if specified).
This fixed my issue
Post a Comment for "Input Shape For 1d Cnn (keras)"