https://stackoverflow.com/questions/55731589/cnn-keras-valueerror-negative-dimension-size-caused-by-subtracting-3-from-2-fo
It seems like maybe the padding is the issue, maybe you can add padding = "same" on each Conv2D layer to resolve the issue.
ex. model.add(layers.Conv2D(64, (3, 3), activation='relu', padding='same'))
https://stackoverflow.com/questions/55731589/cnn-keras-valueerror-negative-dimension-size-caused-by-subtracting-3-from-2-fo
It seems like maybe the padding is the issue, maybe you can add padding = "same" on each Conv2D layer to resolve the issue.
ex. model.add(layers.Conv2D(64, (3, 3), activation='relu', padding='same'))