Skip to content

Commit 350de20

Browse files
committed
Typing added for report
Signed-off-by: Kevin Eykholt <[email protected]>
1 parent bc5bebb commit 350de20

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

art/defences/detector/poison/activation_defence.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def analyze_clusters(self, **kwargs) -> Tuple[Dict[str, Any], np.ndarray]:
350350

351351
return report, self.assigned_clean_by_class
352352

353-
def exclusionary_reclassification(self, report):
353+
def exclusionary_reclassification(self, report: Dict[str, Any]):
354354
"""
355355
This function perform exclusionary reclassification. Based on the ex_re_threshold,
356356
suspicious clusters will be rechecked. If they remain suspicious, the suspected source
@@ -384,8 +384,8 @@ class will be added to the report and the data will be relabelled. The new label
384384
# Test on the suspicious clusters
385385
n_train = len(self.x_train)
386386
indices_by_class = self._segment_by_class(np.arange(n_train), self.y_train)
387-
indicies_by_cluster: List[List[np.ndarray]] = [ # type: ignore
388-
[[] for _ in range(self.nb_clusters)] for _ in range(self.classifier.nb_classes) # type: ignore
387+
indicies_by_cluster: List[List[List]] = [
388+
[[] for _ in range(self.nb_clusters)] for _ in range(self.classifier.nb_classes)
389389
]
390390

391391
# Get all data in x_train in the right cluster

0 commit comments

Comments
 (0)