Image Captioning

Training model part is showing error .
help
link to my code is https://drive.google.com/file/d/1p-9IJ7j8bSrPFVSHVL5rVJ2R-x5rZtEy/view?usp=sharing
@S18CRX0120 plz help asap.

This error arises because encoding dictionary does not contain ‘2513260012_03d33305cf’. Make sure you made dictionary in this format only, check if you need to append ‘.jpg’

Initially ,“2513260012_03d33305cf.jpg” was showing error,then I removed .jpg from line 10,
then it is showing 2513260012_03d33305cf as key error.


@S18CRX0120

Than this is because that keyword is not in your dictionary, make sure you made the dictionary in the right format. Try printint some of the keys() from that. Otherwise use try and except. Also the code of the file is quite big, so its not possible for us to debug, you need to debug it yourself. Check line by line from the code of prateek bhayia. Also we will guide you through the process.

Happy Learning :blush:

I found out my mistake ,Actually I again initialised encoding_train={} in next cell making length of dictionary as zero and leading to key error.

Okay great !!

Happy Learning :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.

ValueError: Layer model_4 expects 2 input(s), but it received 3 input tensors. Inputs received: [<tf.Tensor 'IteratorGetNext:0' shape=(None, None) dtype=float32>, <tf.Tensor 'IteratorGetNext:1' shape=(None, None) dtype=int32>, <tf.Tensor 'IteratorGetNext:2' shape=(None, None) dtype=float32>]

getting this error how to fix it

@S18CRX0120 please help