Matching output with shape in T5 model

I’m trying to fine-tune T5 (ForConditionalGeneration) model with local files (added 3d attention mask in forward function of T5ForConditionalGeneration), and got error when the model evaluates,

File “/home/paulc/customized_t5/models/custom_amr_to_sg/t5_model/”, line 568, in forward
scores += position_bias
RuntimeError: output with shape [32, 12, 1, 2] doesn’t match the broadcast shape [32, 12, 2, 2]

It does’t give an error while training though…
I tried with the solution from the link which is similar to T5,
but it still gives me the same error…

Might evaluate function be the problem?

Thank you in advance!

Did you find the bug?
Thanks in advance