https://preview.redd.it/a9a5cmud890g1.png?width=320&format=png&auto=webp&s=4d3b35fe360f74ce16de394f4cce37ac00ca6acf
Hello everyone, I am training a captcha recognition model using CRNN. The problem now is that there are occasional spikes in my validation loss, which I'm not sure why it occurs. Below is my model architecture at the moment. Furthermore, loss seems to remain stuck around 4-5 mark and not decrease, any idea why? TIA!
input_image = layers.Input(shape=(IMAGE_WIDTH, IMAGE_HEIGHT, 1), name="image", dtype=tf.float32) input_label = layers.Input(shape=(None, ), dtype=tf.float32, name="label") x = layers.Conv2D(32, (3,3), activation="relu", padding="same", kernel_initializer="he_normal")(input_image) x = layers.MaxPooling2D(pool_size=(2,2))(x) x = layers.Conv2D(64, (3,3), activation="relu", padding="same", kernel_initializer="he_normal")(x) x = layers.MaxPooling2D(pool_size=(2,2))(x) x = layers.Conv2D(128, (3,3), activation="relu", padding="same", kernel_initializer="he_normal")(x) x = layers.BatchNormalization()(x) x = layers.MaxPooling2D(pool_size=(2,1))(x) reshaped = layers.Reshape(target_shape=(50, 6*128))(x) x = layers.Dense(64, activation="relu", kernel_initializer="he_normal")(reshaped) rnn_1 = layers.Bidirectional(layers.LSTM(128, return_sequences=True, dropout=0.25))(x) embedding = layers.Bidirectional(layers.LSTM(64, return_sequences=True, dropout=0.25))(rnn_1) output_preds = layers.Dense(units=len(char_to_num.get_vocabulary())+1, activation='softmax', name="Output")(embedding ) Output = CTCLayer(name="CTCLoss")(input_label, output_preds)
submitted by /u/sparttann
[link] [comments]