marcotcr / lime

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

Pytorch output support in lime_tabular.py #697

Open UrjaPawar opened 2 years ago

UrjaPawar commented 2 years 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()