Skip to content

Commit

Permalink
Update inverse_estimation.py
Browse files Browse the repository at this point in the history
  • Loading branch information
annahedstroem authored Feb 23, 2024
1 parent 1125384 commit 6cc1cda
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions quantus/metrics/inverse_estimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,11 @@ def __call__(
a_batch is not None
), "'a_batch' must be provided to run the inverse estimation."

assert self.metric_init.abs == True, (
"To run the inverse estimation, you cannot set 'a_batch' to "
"have positive attributions only. Set 'abs' param of the metric init to 'False'."
)

self.scores = self.metric_init(
model=model,
x_batch=x_batch,
Expand Down

0 comments on commit 6cc1cda

Please sign in to comment.