Skip to content

Commit

Permalink
Update workflows for TensorFlow/Keras 2.14
Browse files Browse the repository at this point in the history
Signed-off-by: Beat Buesser <[email protected]>
  • Loading branch information
beat-buesser committed Nov 1, 2023
1 parent 9614bb6 commit cf8295e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions art/defences/detector/poison/clustering_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def analyze_by_relative_size(
for c_id in clean_clusters[0]:
summary_poison_clusters[i][c_id] = 0

assigned_clean = self.assign_class(clusters, clean_clusters, poison_clusters)
assigned_clean = self.assign_class(clusters, clean_clusters[0], poison_clusters[0])
all_assigned_clean.append(assigned_clean)

# Generate report for this class:
Expand Down Expand Up @@ -328,7 +328,7 @@ def analyze_by_silhouette_score(
logger.info("computed silhouette score: %s", silhouette_avg)
dict_i.update(suspicious=True)
else:
poison_clusters = [[]]
poison_clusters = (np.array([[]]), )
clean_clusters = np.where(percentages >= 0)
dict_i.update(suspicious=False)
else:
Expand All @@ -342,7 +342,7 @@ def analyze_by_silhouette_score(
for c_id in clean_clusters[0]:
summary_poison_clusters[i][c_id] = 0

assigned_clean = self.assign_class(clusters, clean_clusters, poison_clusters)
assigned_clean = self.assign_class(clusters, clean_clusters[0], poison_clusters[0])
all_assigned_clean.append(assigned_clean)
report.update(report_class)

Expand Down

0 comments on commit cf8295e

Please sign in to comment.