Problem in training MODEL

THIS IS THE ERROR i am getting
KeyError Traceback (most recent call last)
in ()
1 for i in range(epochs):
2 generator = data_generator(train_descriptions,encoding_train,word_to_idx,max_len,batch_size)
----> 3 model.fit_generator(generator,epochs=1,steps_per_epoch=steps,verbose=1)
4 model.save(’./model_weights/model_’+str(i)+’.h5’)

9 frames
in data_generator(train_descriptions, encoding_train, word_to_idx, max_len, batch_size)
7 n += 1
8
----> 9 photo = encoding_train[key+".jpg"]
10 for desc in desc_list:
11

KeyError: ‘2513260012_03d33305cf.jpg’

Hey @YashSINGHAI, you may need to try except, also make sure you made encoding_train dictionary with .jpg at end.

Hope this resolved your doubt.
Plz mark the doubt as resolved in my doubts section. :blush:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

@YashSINGHAI
me too having the same doubt. If your doubt gets cleared, can you please explain it to me?

@S18CRX0120
can you please explain to me in detail how to clear the error?