JinaBertModel is not compatible with output_attentions=True

#46
by RickyX - opened

Dear authors, I found the JinaBert model is not able to output attentions, no matter I set output_attentions=True in the model initialization stage or forward stage. The error is the same as:
File "root-to-jina/modeling_bert.py", line 841, in forward
all_self_attentions = all_self_attentions + (layer_outputs[1],)
IndexError: tuple index out of range

Sign up or log in to comment