# Higher value of strides in conv1d

I am using Conv1d for time-series data and I have create a model as follows,

model=Sequential()
model.add(Conv1D(32,250,strides=9,padding='same',input_shape=(1500,9), kernel_regularizer=regularizers.l2(0.01)))
c1 = MaxPooling1D(2)
model.add(c1)
model.add(Dropout(0.5))
model.add(BatchNormalization())

model.add(Conv1D(64,250,strides=9, padding='same',kernel_regularizer=regularizers.l2(0.01)))
conv1 = MaxPooling1D(2)
model.add(conv1)
model.add(Dropout(0.5))
model.add(BatchNormalization())

model.add(Flatten())

model.add(Dense(512, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(40, activation='softmax'))

opt = keras.optimizers.adam(lr = 0.001, decay = 1e-6)
model.compile(loss = 'categorical_crossentropy', optimizer = opt, metrics = ['accuracy'])


The model.summary() when using strides as 9 looks like

The model.summary() for the above model with stride as 1 looks as follows

I am confused as to how would the higher number of strides affect the performance of the model. Which would be better, strides = 1 or strides = 9? Can someone guide me with this?

• Don't you want causal padding for most ts models? – generic_user Feb 19 at 11:53

## 1 Answer

• In most cases which I have seen, a larger number of strides skips the essential context of an image required for image classification. The higher number of strides moves the convolution windows far away from each other which may lower down validation accuracy. For smaller images, they are useless. But, for larger images they might prove useful.

• Smaller strides like 1 are the best choice for Convolutional networks. They move the convolution window one by one to the next of pixels/values. This helps to retain the context of the image, and hence the validation accuracy remains high, if the images are smaller in image classification tasks.

• I am using conv1d in time-series data. Its basically is a signal. So I am trying to use strides of size 10 or more to filter out the noise. – Gala Feb 19 at 20:55