From c40d1c6964ee7bc63657baf56ddedce70e4b5f13 Mon Sep 17 00:00:00 2001 From: annahedstroem Date: Mon, 4 Dec 2023 13:29:20 +0100 Subject: [PATCH] added explain_func_kwargs to custom_preprocess --- quantus/metrics/randomisation/smooth_mprt.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quantus/metrics/randomisation/smooth_mprt.py b/quantus/metrics/randomisation/smooth_mprt.py index 96e76d1e..d79317a2 100644 --- a/quantus/metrics/randomisation/smooth_mprt.py +++ b/quantus/metrics/randomisation/smooth_mprt.py @@ -546,7 +546,9 @@ def custom_preprocess( return None a_batch_chunks = [] - for a_chunk in self.generate_explanations(model, x_batch, y_batch): + for a_chunk in self.generate_explanations( + model, x_batch, y_batch, **{**kwargs, **self.explain_func_kwargs} + ): a_batch_chunks.extend(a_chunk) return dict(a_batch=np.asarray(a_batch_chunks))