Closed wulele2 closed 2 years ago
could you send the visualized file to me ,thanks!
I have successfully visualized, thank you for your great work。
https://github.com/wulele2/Detr-heat-map-visualization Hi, I ran the code you posted and got the following error, how do I fix it? Thanks a lot! Traceback (most recent call last): File "test.py", line 117, in
model.transformer.decoder.layers[-1].multihead_attn.register_forward_hook( File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 948, in getattr type(self).name, name)) AttributeError: 'TransformerDecoderLayer' object has no attribute 'multihead_attn'
我运行没问题,可能是pytorch版本问题,我的是1.7.1
I have successfully visualized, thank you for your great work。