Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prototype of ViT #210

Open
p16i opened this issue Sep 21, 2024 · 1 comment
Open

Prototype of ViT #210

p16i opened this issue Sep 21, 2024 · 1 comment
Labels
enhancement New feature or request model compatibility Compatibility for new or variations of existing models

Comments

@p16i
Copy link
Contributor

p16i commented Sep 21, 2024

Hi Christopher,

Here is my prototype of LRP+ViT: https://colab.research.google.com/drive/1EWjPV3FiDZIAp0gZCyTjdB9OnQD8-m8W?usp=sharing

@chr5tphr chr5tphr added model compatibility Compatibility for new or variations of existing models enhancement New feature or request labels Feb 7, 2025
@a1247418
Copy link

Thanks for the implementation!

It works for me, but there is an issue with conservation. When setting zero_params="bias" (for SafeEpsilon and SafeGamma), conservation is observed throughout the network up until the first block, but breaks at the input layer. As we discussed in person, this is most likely due to the classifier token absorbing some relevance that does not reach the input.

Also, just fyi, the implementation suffers from the issue described in #148 meaning that a combination of low gamma, low epsilon, and zero_params="bias" leads to instable/exploding relevance values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request model compatibility Compatibility for new or variations of existing models
Projects
None yet
Development

No branches or pull requests

3 participants