1
$\begingroup$

Train 8000 images Val 1000 images

i got this plot for 10 epochs with the last one which is loss: 2.9178 - accuracy: 0.3755 - val_loss: 7.3393 - val_accuracy: 0.2270

enter image description here

The model is

def define_model(vocab_size,max_length):        
    inputs1=Input(shape=(512,))        
    fe2 = Dense(128, activation='relu')(inputs1)        
    inputs2 = Input(shape=(max_length,))    
    se1 = Embedding(vocab_size, 128, mask_zero=True)(inputs2)    
    se4 = LSTM(128)(se1)    
    decoder1 = Concatenate()([fe2, se4])    
    decoder2 = Dense(128, activation='relu')(decoder1)    
    outputs = Dense(vocab_size, activation='softmax')(decoder2)        
    model=Model(inputs=[inputs1,inputs2],outputs=outputs)    
    model.compile(loss='categorical_crossentropy',optimizer='adam', metrics=['accuracy'])    
    return model

i changed LSTM to GRU and got enter image description here

$\endgroup$
3
  • $\begingroup$ 10 epochs seems too low to make a conclusion. Why are you using LSTMs for images? $\endgroup$ Sep 27 at 15:50
  • $\begingroup$ I tried it first then I can use GRU .. do you mean may be the problem from the using LSTM ? $\endgroup$
    – Lei
    Sep 27 at 19:50
  • $\begingroup$ I don't understand the logic behind your model. Generally speaking, we use CNN to build models based on pictures. LSTMs could be also used but they are generally more adapted to time series. $\endgroup$ Sep 28 at 8:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.