-
Notifications
You must be signed in to change notification settings - Fork 4
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
RuntimeError when Registering Hooks on Tensor in mm_albef_dataset #8
Comments
Maybe showing your virtual environment and GPU environment will help solve the problem. |
Thank you for the suggestion, @ChengYuChuan here are the GPU and virtual environment used : GPU environment :
GPU resource: NVIDIA Geforce RTX 3080 laptop GPU Virtual environment :(I'm using the same conda env provided in the repo to ensure reproducibility)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
First of all, Thank you for sharing the code base of this interesting work!
I encountered an issue while trying to run the following command
python mm-shap_albef_dataset.py 3 "refcoco" "yes"
.Below is the error message I received :
RuntimeError: cannot register a hook on a tensor that doesn't require gradient
Here's the full Traceback:
I resolved this issue by setting
save_attention=False
at this line 215 - mm_albef_dataset.py :My question is, is it mandatory to keep registering the attention gradients to accuretly calculate the textual and visual contributions?
The text was updated successfully, but these errors were encountered: