I have build a model to classify numbers and characters on Images. I trained it on the Chars74K dataset and in training it has 80% validation accuracy. I just use the number and uppercase characters of the computer generated dataset. But when I feed it some example images it doesn´t classify a single one of them right. this is my model:
model = tf.keras.models.Sequential([ tf.keras.layers.Dense(512, input_shape=(4096,), name="first_hidden", activation=tf.nn.sigmoid), tf.keras.layers.Dense(36, name="output", activation=tf.nn.sigmoid) ]) model.compile(optimizer="adam", loss="categorical_crossentropy", metrics=["accuracy"]) model.fit(xTrain, yTrain, epochs=20, batch_size=200, validation_split=0.2, callbacks=[tensorboard])
I have run 155 different combinations of models (1, 2 or 3 hidden layers with each 32, 64, 128, 256 or 512 Neurons) and this was the best one.
Could someone of you please help me?