You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run the code below, I get error AssertionError: Forward hook did not obtain any outputs for given layer
I have tried running it locally and in Google Colab with both having the same result
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"],
)
The text was updated successfully, but these errors were encountered:
captum==0.6.0
transformers==4.28.1
transformers-interpret==0.10.0
python 3.7.4
When I run the code below, I get error
AssertionError: Forward hook did not obtain any outputs for given layer
I have tried running it locally and in Google Colab with both having the same result
The text was updated successfully, but these errors were encountered: