enjakokalj / TransSHAP

MIT License
47 stars 4 forks source link

The code given in the README file does not work #6

Open s0ap opened 2 years ago

s0ap commented 2 years ago

For example, when I try the LIME text explainer, I get the following error: Attribute Error: 'SequenceClassifierOutput' object has no attribute 'detach'

Even the SHAP explainer code does not work - can anyone help please?

0010SS commented 1 year ago

I faced the same issue and the code runs when I change predictions = outputs.detach().cpu().numpy() to predictions = outputs.logits.detach().cpu().numpy()