chr5tphr / zennit

Zennit is a high-level framework in Python using PyTorch for explaining/exploring neural networks using attribution methods like LRP.
Other
200 stars 32 forks source link

Bug: MultiheadAttention in types #188

Closed rachtibat closed 1 year ago

rachtibat commented 1 year ago

Hi,

here for some mysterious reason the nn.MultiheadAttention is part of the Activation types.

I am actually implementing a canonizer for this module and then it just didn't trigger and I was wondering what is happening until I found out that the layer_base automatically overwrites my rule with the Pass() one (;

Best, Reduan

chr5tphr commented 1 year ago

Hey Reduan,

yes, good catch! If you would like to open a PR, you can remove it from src/zennit/types.py:111.

rachtibat commented 1 year ago

Hey,

yes, I can do it. It might take two weeks as I'm going to a conference now.

Best

rachtibat commented 1 year ago

Thanks for your patience. I opened a pull request #191

chr5tphr commented 1 year ago

Merged.