Hi everyone!

I’ve noticed that there are already numerous topics about this problem here. However, despite trying all the advice given, I’m still stuck.

Initially, I received the error message `Shapes (None, 1) and (None, 24) are incompatible`

when using `loss='categorical_crossentropy'`

and `optimizer='rmsprop'`

.

In my attempt to address this, I implemented the following code snippet:

```
num_unique_classes = len(np.unique(training_labels))
training_labels_encoded = tf.keras.utils.to_categorical(training_labels, num_classes=num_unique_classes)
validation_labels_encoded = tf.keras.utils.to_categorical(validation_labels, num_classes=num_unique_classes)
```

But then, I encountered a new error: `IndexError: index 24 is out of bounds for axis 1 with size 24`

.

I also experimented with using `'sparse_categorical_crossentropy'`

along with `Dense(26, activation='softmax')`

and `Dense(24, activation='softmax')`

. However, this led to the error message: `InvalidArgumentError: Graph execution error`

.

I would greatly appreciate any insights or help that you can provide. Thank you in advance!