-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: TensorFlow explainers have the same signature as the rest
Right now the TensorFlow gradient explainers do not implement the `_generate_counterfactuals` method from the `BaseExplainer` class. This means that: 1) You cannot instantiate object of class `DiceTensorFlow(1/2)` without replacing the `__class__` of another method, because it is not a valid child of `ExplainerBase`. 2) By overriding the parent `generate_counterfactuals` method, the two classes bypass any validation steps that would normally be carried out by the base class (e.g. checking that the number of CF queries is non-negative). Signed-off-by: Asen Dotsinski <[email protected]>
- Loading branch information
1 parent
8cd02e8
commit 010f2bb
Showing
2 changed files
with
22 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters