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

"unexpected keyword argument 'head_fusion'" and "required positional argument: 'category_index'" #11

Open
expectopatronum opened this issue Dec 13, 2021 · 0 comments

Comments

@expectopatronum
Copy link

Hi,
I tried to run the example from the README.md and I run into the following issues:

  • grad_rollout = VITAttentionGradRollout(model, discard_ratio=0.9, head_fusion='max') causes TypeError: __init__() got an unexpected keyword argument 'head_fusion'.
  • mask = grad_rollout(input_tensor) causes TypeError: __call__() missing 1 required positional argument: 'category_index' although the README suggests it is optional (If category_index isn't specified, Attention Rollout will be used, otherwise Gradient Attention Rollout will be used.). Is this a mistake or should I pass None for example?

Thanks a lot and best regards
Verena

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant