C4W2_Assignment_2_Transformer Summarizer_Exercise 5 - next_word

hi @Deepti_Prasad

even though Exercise 5 - next_word got passed the test ,
but function def summarize(model, input_document): shows errors.







Thank you
suman

@vemula_suman

did you try searching for similar threads to your issue?

your predicted id, sequence to detect next word is incorrect.

for any model to detect next word, requires first the word at interest that is your input, and next to detect what would be your next word that would be output and finally the model you created to detect the next word.

remember input and output here I have used general terms, but these are assigned with call arguments for the grade cell you are encountering the issue.

Hi Deepti ,
Initially i referred those queries but i could not solve, but now i rechecked the posts ,

Now I got the solution ,

Thank you very much .

1 Like

Great you are getting better at debugging, do let know what was issue in your codes, so other learners find your post helpful if they encounter similar issue.

Regards
DP

Hi @vemula_suman , I have the same error and I could not find the solution after trying for hours. Could you please share how you resolved it? Thank you!