List index out of range for C3W2

When I tried to run session 2.5, Try it out. There is an error happened as below:---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
in
11 classifying computational problems by difficulty and class of relationship?"
12
—> 13 print(“Output: {}”.format(get_model_answer(model, question, passage, tokenizer)))
14 print(“Expected: Computational complexity theory”)

in get_model_answer(model, question, passage, tokenizer, max_seq_length)
29 # using scores, get most likely answer
30 # use the get_span_from_scores function
—> 31 span_start, span_end = get_span_from_scores(start_scores, end_scores, input_mask)
32
33 # Using array indexing to get the tokens from the span start to span end (including the span_end)

in get_span_from_scores(start_scores, end_scores, input_mask, verbose)
29
30 # both input masks should be 1
—> 31 if input_mask[i] == input_mask[j] == 1: # complete this line
32
33 # check if the sum of the start and end scores is greater than the previous max sum

IndexError: list index out of range. For the get_span_from_scores, I have passed the test and the relevant codes are as below.

set the range for i

codes removed by moderator complete this line

what is the problem for this?

please dm the screenshot of codes in question here?@qin6

There must be something wrong with your solution, which when the grader runs other tests it fails!

Especially in this line or function! one of the array indexes goes beyond the limit of the array…