marcotcr / lime

Lime: Explaining the predictions of any machine learning classifier
BSD 2-Clause "Simplified" License
11.41k stars 1.79k forks source link

Pytorch output support in lime_tabular.py #697

Open UrjaPawar opened 1 year ago

UrjaPawar commented 1 year ago

If 'yss' is output of a pytorch model, then this check is necessary in order to run a pytorch model trained on tabular dataset: if not isinstance(yss, np.ndarray): yss = yss.detach().numpy()