Is the stride applied both in the horizontal and vertical directions in convolutional neural networks?
Yes, in Keras this is simply implemented by using a tuple for the stride argument of a convolutional layer, with each element of the tuple corresponding to the stride of each dimension.