Skip to content

Commit 23cd70b

Browse files
committed
[WIP] Import optimization
Signed-off-by: alvaro <[email protected]>
1 parent 300ed89 commit 23cd70b

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

tests/defences/detector/poison/test_clustering_centroid_analysis.py

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,19 @@
1818
from __future__ import absolute_import, division, print_function, unicode_literals
1919

2020
import json
21-
from unittest.mock import MagicMock, patch
22-
23-
import tensorflow as tf
24-
from sklearn.base import ClusterMixin
25-
from tensorflow.keras.metrics import Precision, Recall, AUC
26-
2721
import logging
2822
import unittest
29-
from typing import Union
23+
from unittest.mock import MagicMock, patch
3024

3125
import numpy as np
32-
import pandas as pd
33-
34-
from art.estimators.classification import KerasClassifier, TensorFlowV2Classifier
35-
from sklearn.cluster import DBSCAN
36-
from sklearn.decomposition import FastICA, PCA
26+
import tensorflow as tf
27+
from sklearn.base import ClusterMixin
3728
from tensorflow.keras import Model, Sequential, Input
3829
from tensorflow.keras.layers import Dense
39-
from umap import UMAP
4030

41-
from art.defences.detector.poison.clustering_centroid_analysis import ClusteringCentroidAnalysis, _calculate_centroid, _class_clustering, _feature_extraction, _cluster_classes, _encode_labels
42-
from art.defences.detector.poison.utils import ReducerType, ClustererType
31+
from art.defences.detector.poison.clustering_centroid_analysis import ClusteringCentroidAnalysis, _calculate_centroid, \
32+
_class_clustering, _feature_extraction, _cluster_classes, _encode_labels
33+
from art.estimators.classification import TensorFlowV2Classifier
4334

4435
logger = logging.getLogger(__name__)
4536
logger.setLevel(logging.INFO)

0 commit comments

Comments
 (0)