-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The mask generation util function in DIANNA that we use changed names since 1.4.0, so we bump the requirement for this.
- Loading branch information
Showing
4 changed files
with
7 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ authors: | |
|
||
date-released: 2023-10-19 | ||
doi: 10.5281/zenodo.10018768. | ||
version: "0.2.0" | ||
version: "0.3.0" | ||
repository-code: "[email protected]:dianna-ai/distance_explainer" | ||
keywords: | ||
- XAI | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
import logging | ||
import dianna.utils | ||
import numpy as np | ||
from dianna.utils.maskers import generate_masks_for_images | ||
from dianna.utils.maskers import generate_interpolated_float_masks_for_image | ||
from sklearn.metrics import pairwise_distances | ||
from tqdm import tqdm | ||
import numpy.typing | ||
|
@@ -12,7 +12,7 @@ | |
|
||
__author__ = "Christiaan Meijer" | ||
__email__ = "[email protected]" | ||
__version__ = "0.2.0" | ||
__version__ = "0.3.0" | ||
|
||
|
||
class DistanceExplainer: | ||
|
@@ -72,7 +72,7 @@ def explain_image_distance(self, model_or_function, input_data, embedded_referen | |
img_shape = input_data.shape[1:3] | ||
# Expose masks for to make user inspection possible | ||
if masks is None: | ||
self.masks = generate_masks_for_images(img_shape, self.n_masks, active_p_keep, self.feature_res) | ||
self.masks = generate_interpolated_float_masks_for_image(img_shape, active_p_keep, self.n_masks, self.feature_res) | ||
else: | ||
self.masks = masks | ||
if self.masks.shape[0] != self.n_masks: | ||
|