This neural network seems to be working fine when NUM_CLASSES = 15, but when I try to add more labels it is unable to train the model and the accuracy stay stable at 0.05. Any ideas on what might be wrong?
model = tf.keras.models.Sequential([ tf.keras.layers.Dense(20, activation='relu'), tf.keras.layers.Dense(8, activation='relu'), tf.keras.layers.Dense(8, activation='relu'), tf.keras.layers.Dense(NUM_CLASSES, activation='softmax') ]) model.compile( optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'] )
submitted by /u/losaggelos
[visit reddit] [comments]