Incorrect output dimension?
The error message is pretty clear... you feed a vector of length 24 to your model, but your model is outputting a vector of length 1.

Change :

dense3 = Dense(1 ,activation = 'softmax')(dense2)


to :

dense3 = Dense(24 ,activation = 'softmax')(dense2)