-
Notifications
You must be signed in to change notification settings - Fork 6
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
Training SHAP on ViT for custom dataset #9
Comments
Hi, thanks for your interest in our work. Once you get your fine-tuned ViT classifier, the next step is to train surrogate model where your ViT model is finetuned with random masking so that it can acommodate held-out image patches. The final step is to train explainer model using our custom loss function. The scripts for each step are available here. |
Hi @chanwkimlab, I'm currently trying to use scripts for training surrogate model. Based on this lines of code in main.py (lines 63-70):
I asssume that i need to implement Dataset and Datamodule classes for my own datasets. Is that right or is there some more straightforward way to do this? If you'd known about some repository that uses that in such a way, that would also be a huge help. Anyway thanks in advance! |
You may need to slightly modify the dataset implementation to fit your data, as the current ViT Shapley implementation expects a specific output format for the |
Hello, could you please provide some guidelines on how to obtain SHAP values for a finetuned vision transformer for custom dataset?
I am finetuning a google/vit-base-patch16-224-in21k with a classifier head on my own dataset. How can I get Shapley values with it?
The text was updated successfully, but these errors were encountered: