You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the question answering notebook after the cell max_answer_length = 30 this the next cell code
.......
start_indexes` = np.argsort(start_logits)[-1 : -n_best_size - 1 : -1].tolist()`
end_indexes = np.argsort(end_logits)[-1 : -n_best_size - 1 : -1].tolist()`
valid_answers = []`
for start_index in start_indexes:
for end_index in end_indexes:
# Don't consider out-of-scope answers, either because the indices are out of bounds or correspond
# to part of the input_ids that are not in the context.
if (
start_index >= len(offset_mapping)
or end_index >= len(offset_mapping)
or offset_mapping[start_index] is None
or offset_mapping[end_index] is None
):
continue
........
Here start_indexes can never be more than sequence length becasue the argmax is over an array of 384 sequences i.e the max sequence length . So how does start_index >= len(offset_mapping) & end_index >= len(offset_mapping) make sense here ?
The text was updated successfully, but these errors were encountered:
In the question answering notebook after the cell max_answer_length = 30 this the next cell code
Here start_indexes can never be more than sequence length becasue the argmax is over an array of 384 sequences i.e the max sequence length . So how does
start_index >= len(offset_mapping)
&end_index >= len(offset_mapping)
make sense here ?The text was updated successfully, but these errors were encountered: