GoneZ5 / SCRIPT

18 stars 2 forks source link

fix a KeyError bug #2

Closed AheadYoung closed 2 years ago

AheadYoung commented 2 years ago

attns in models/transformer.py is a dict, attention_scores can not be get by using attns[-1]. It should be attns['std']

GoneZ5 commented 2 years ago

attns in models/transformer.py is a dict, attention_scores can not be get by using attns[-1]. It should be attns['std']

Thanks for your participation in the bugs fixing of our code. But the variable attns in line 372 of models/transformer.py is not a dict. It is different from the attns in line 501.