hila-chefer / Transformer-Explainability

[CVPR 2021] Official PyTorch implementation for Transformer Interpretability Beyond Attention Visualization, a novel method to visualize classifications by Transformer based networks.
MIT License
1.75k stars 232 forks source link

Trying this with vit-pytorch and hugging face transformer #56

Closed krishnaadithya closed 1 year ago

krishnaadithya commented 1 year ago

AttributeError: 'ViT' object has no attribute 'relprop'

hugging face:

model = ViTForImageClassification.from_pretrained('google/vit-base-patch16-224').cuda() AttributeError: 'ViTForImageClassification' object has no attribute 'relprop'

Song-z-h commented 5 months ago

How did you solve it?

yumikim381 commented 4 months ago

Same problem here, did you solve it?