Here is an example of a basic classification model: Basic classification: Classify images of clothing  |  TensorFlow Core 14.
Classes should be labeled starting from 0, because the model outputs class probabilities (or logits), and column indexes are used to identify predicted class.
If you have 5 classes, the final dense layer should have 5 units. You can insert Flatten layer after the last Conv1D, then Dense(128, activation=‘relu’), then Dense(5, activation=‘softmax’).
If you do not specify ‘softmax’ in the final layer, you should define loss as
SparseCategoricalCrossentropy(from_logits=True).