Keras CNN layers are throwing a ValueError

This is my first time working with CNNs and I’m getting the following error:

ValueError: Negative dimension size caused by subtracting 5 from 1 for 'conv2d_5/convolution' (op: 'Conv2D') with input shapes: [?,1,18,64], [5,5,64,64].

It is pointing to these lines in my code:

def build_model(args):
    model = Sequential()
    model.add(Lambda(lambda x: x / 127.5 - 1.0, input_shape=INPUT_SHAPE))
    model.add(Conv2D(24, (5, 5), activation='elu', strides=(2, 2)))
    model.add(Conv2D(36, (5, 5), activation='elu', strides=(2, 2)))
    model.add(Conv2D(48, (5, 5), activation='elu', strides=(2, 2)))
    model.add(Conv2D(64, (5, 5), activation='elu')) # These two lines
    model.add(Conv2D(64, (5, 5), activation='elu')) # These two lines
    model.add(Dropout(args.keep_prob))
    model.add(Flatten())
    model.add(Dense(100, activation='elu'))
    model.add(Dense(50, activation='elu'))
    model.add(Dense(10, activation='elu'))
    model.add(Dense(1))
    model.summary()

    return model

The strides are 1,1 so I assume that (5,5) is causing a negative value but I don’t know how to solve that. This is my full stacktrace:

Using TensorFlow backend.
------------------------------
Parameters
------------------------------
data_dir             := data
test_size            := 0.2
keep_prob            := 0.5
nb_epoch             := 10
samples_per_epoch    := 20000
batch_size           := 40
save_best_only       := True
learning_rate        := 0.0001
------------------------------
2020-02-10 14:02:04.502287: I tensorflow/core/platform/cpu_feature_guard.cc:145] This TensorFlow binary is optimized with Intel(R) MKL-DNN to use the following CPU instructions in performance critical operations:  SSE4.1 SSE4.2 AVX AVX2 FMA
To enable them in non-MKL-DNN operations, rebuild TensorFlow with the appropriate compiler flags.
2020-02-10 14:02:04.525190: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2294705000 Hz
2020-02-10 14:02:04.525521: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x56194f263770 executing computations on platform Host. Devices:
2020-02-10 14:02:04.525547: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): Host, Default Version
2020-02-10 14:02:04.527056: I tensorflow/core/common_runtime/process_util.cc:115] Creating new thread pool with default inter op setting: 2. Tune using inter_op_parallelism_threads for best performance.
Traceback (most recent call last):
  File "/home/onur/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 1610, in _create_c_op
    c_op = c_api.TF_FinishOperation(op_desc)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Negative dimension size caused by subtracting 5 from 1 for 'conv2d_5/convolution' (op: 'Conv2D') with input shapes: [?,1,18,64], [5,5,64,64].

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/onur/Documents/behavirol-cloning-carla/Model.py", line 91, in <module>
    main()
  File "/home/onur/Documents/behavirol-cloning-carla/Model.py", line 86, in main
    model = build_model(args)
  File "/home/onur/Documents/behavirol-cloning-carla/Model.py", line 32, in build_model
    model.add(Conv2D(64, (5, 5), activation='elu'))
  File "/home/onur/anaconda3/lib/python3.7/site-packages/keras/engine/sequential.py", line 182, in add
    output_tensor = layer(self.outputs[0])
  File "/home/onur/anaconda3/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py", line 75, in symbolic_fn_wrapper
    return func(*args, **kwargs)
  File "/home/onur/anaconda3/lib/python3.7/site-packages/keras/engine/base_layer.py", line 489, in __call__
    output = self.call(inputs, **kwargs)
  File "/home/onur/anaconda3/lib/python3.7/site-packages/keras/layers/convolutional.py", line 171, in call
    dilation_rate=self.dilation_rate)
  File "/home/onur/anaconda3/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py", line 3717, in conv2d
    **kwargs)
  File "/home/onur/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/ops/nn_ops.py", line 917, in convolution_v2
    name=name)
  File "/home/onur/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/ops/nn_ops.py", line 1009, in convolution_internal
    name=name)
  File "/home/onur/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/ops/gen_nn_ops.py", line 1071, in conv2d
    data_format=data_format, dilations=dilations, name=name)
  File "/home/onur/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/framework/op_def_library.py", line 793, in _apply_op_helper
    op_def=op_def)
  File "/home/onur/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/framework/func_graph.py", line 548, in create_op
    compute_device)
  File "/home/onur/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 3429, in _create_op_internal
    op_def=op_def)
  File "/home/onur/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 1773, in __init__
    control_input_ops)
  File "/home/onur/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 1613, in _create_c_op
    raise ValueError(str(e))
ValueError: Negative dimension size caused by subtracting 5 from 1 for 'conv2d_5/convolution' (op: 'Conv2D') with input shapes: [?,1,18,64], [5,5,64,64].