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?
I faced the same issue and the code runs when I change predictions = outputs.detach().cpu().numpy() to predictions = outputs.logits.detach().cpu().numpy()
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?