File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 28
28
import numpy as np
29
29
import six
30
30
31
- from art .estimators .classification .classifier import ClassGradientsMixin , ClassifierMixin
32
31
from art .estimators .tensorflow import TensorFlowV2Estimator
33
- from art .utils import check_and_transform_label_format
32
+ from art .estimators . classification . classifier import ClassGradientsMixin , ClassifierMixin
34
33
35
34
if TYPE_CHECKING :
36
35
@@ -224,6 +223,7 @@ def fit(
224
223
epoch to adjust the learning rate.
225
224
"""
226
225
import tensorflow as tf
226
+ from art .utils import check_and_transform_label_format
227
227
228
228
if self ._train_step is None : # pragma: no cover
229
229
if self ._loss_object is None : # pragma: no cover
@@ -449,6 +449,7 @@ def compute_loss(
449
449
:return: Array of losses of the same shape as `x`.
450
450
"""
451
451
import tensorflow as tf
452
+ from art .utils import check_and_transform_label_format
452
453
453
454
if self ._loss_object is None : # pragma: no cover
454
455
raise TypeError ("The loss function `loss_object` is required for computing losses, but it is not defined." )
Original file line number Diff line number Diff line change 26
26
import numpy as np
27
27
from tqdm .auto import trange
28
28
29
- from art .config import ART_NUMPY_DTYPE
30
-
31
29
if TYPE_CHECKING :
32
30
# pylint: disable=cyclic-import
33
31
from art .utils import CLIP_VALUES_TYPE , PREPROCESSING_TYPE , ESTIMATOR_TYPE
@@ -192,6 +190,7 @@ def clone_for_refitting(self) -> "ESTIMATOR_TYPE":
192
190
raise NotImplementedError
193
191
194
192
def _check_params (self ) -> None :
193
+ from art .config import ART_NUMPY_DTYPE
195
194
from art .defences .postprocessor .postprocessor import Postprocessor
196
195
from art .defences .preprocessor .preprocessor import Preprocessor
197
196
Original file line number Diff line number Diff line change 25
25
26
26
import numpy as np
27
27
28
- from art .estimators .generation .generator import GeneratorMixin
29
28
from art .estimators .tensorflow import TensorFlowV2Estimator
29
+ from art .estimators .generation .generator import GeneratorMixin
30
30
31
31
if TYPE_CHECKING :
32
32
Original file line number Diff line number Diff line change 16
16
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17
17
# SOFTWARE.
18
18
"""
19
- This module implements the abstract estimators `TensorFlowEstimator` and ` TensorFlowV2Estimator` for TensorFlow models.
19
+ This module implements the abstract estimators `TensorFlowV2Estimator` for TensorFlow models.
20
20
"""
21
21
from __future__ import annotations
22
22
Original file line number Diff line number Diff line change 99
99
from art .estimators .classification .xgboost import XGBoostClassifier
100
100
from art .estimators .certification .deep_z import PytorchDeepZ
101
101
from art .estimators .certification .interval import PyTorchIBPClassifier
102
- from art .estimators .certification .derandomized_smoothing .derandomized import BlockAblator , ColumnAblator
102
+ from art .estimators .certification .derandomized_smoothing .ablators import BlockAblator , ColumnAblator
103
103
from art .estimators .generation .tensorflow import TensorFlowV2Generator
104
104
from art .estimators .object_detection .object_detector import ObjectDetector
105
105
from art .estimators .object_detection .pytorch_object_detector import PyTorchObjectDetector
You can’t perform that action at this time.
0 commit comments