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

Error :AssertionError: Forward hook did not obtain any outputs for given layer #146

Open
anonimoustt opened this issue May 13, 2024 · 0 comments

Comments

@anonimoustt
Copy link

I was trying following code and found an error

from transformers import AutoModelForSequenceClassification, AutoTokenizer
from transformers_interpret import ZeroShotClassificationExplainer

tokenizer = AutoTokenizer.from_pretrained('facebook/bart-large-mnli')

model = AutoModelForSequenceClassification.from_pretrained('facebook/bart-large-mnli')

zero_shot_explainer = ZeroShotClassificationExplainer(model, tokenizer)

word_attributions = zero_shot_explainer(
"Today apple released the new Macbook showing off a range of new features found in the proprietary silicon chip computer. ",
labels = ["finance", "technology", "sports"],
)
AssertionError: Forward hook did not obtain any outputs for given layer

Limitation: So your library cannot generate explanations for the outcomes generated by ''facebook/bart-large-mnli''??

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