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 2828import numpy as np
2929import six
3030
31- from art .estimators .classification .classifier import ClassGradientsMixin , ClassifierMixin
3231from art .estimators .tensorflow import TensorFlowV2Estimator
33- from art .utils import check_and_transform_label_format
32+ from art .estimators . classification . classifier import ClassGradientsMixin , ClassifierMixin
3433
3534if TYPE_CHECKING :
3635
@@ -224,6 +223,7 @@ def fit(
224223 epoch to adjust the learning rate.
225224 """
226225 import tensorflow as tf
226+ from art .utils import check_and_transform_label_format
227227
228228 if self ._train_step is None : # pragma: no cover
229229 if self ._loss_object is None : # pragma: no cover
@@ -449,6 +449,7 @@ def compute_loss(
449449 :return: Array of losses of the same shape as `x`.
450450 """
451451 import tensorflow as tf
452+ from art .utils import check_and_transform_label_format
452453
453454 if self ._loss_object is None : # pragma: no cover
454455 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 2626import numpy as np
2727from tqdm .auto import trange
2828
29- from art .config import ART_NUMPY_DTYPE
30-
3129if TYPE_CHECKING :
3230 # pylint: disable=cyclic-import
3331 from art .utils import CLIP_VALUES_TYPE , PREPROCESSING_TYPE , ESTIMATOR_TYPE
@@ -192,6 +190,7 @@ def clone_for_refitting(self) -> "ESTIMATOR_TYPE":
192190 raise NotImplementedError
193191
194192 def _check_params (self ) -> None :
193+ from art .config import ART_NUMPY_DTYPE
195194 from art .defences .postprocessor .postprocessor import Postprocessor
196195 from art .defences .preprocessor .preprocessor import Preprocessor
197196
Original file line number Diff line number Diff line change 2525
2626import numpy as np
2727
28- from art .estimators .generation .generator import GeneratorMixin
2928from art .estimators .tensorflow import TensorFlowV2Estimator
29+ from art .estimators .generation .generator import GeneratorMixin
3030
3131if TYPE_CHECKING :
3232
Original file line number Diff line number Diff line change 1616# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1717# SOFTWARE.
1818"""
19- This module implements the abstract estimators `TensorFlowEstimator` and ` TensorFlowV2Estimator` for TensorFlow models.
19+ This module implements the abstract estimators `TensorFlowV2Estimator` for TensorFlow models.
2020"""
2121from __future__ import annotations
2222
Original file line number Diff line number Diff line change 9999 from art .estimators .classification .xgboost import XGBoostClassifier
100100 from art .estimators .certification .deep_z import PytorchDeepZ
101101 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
103103 from art .estimators .generation .tensorflow import TensorFlowV2Generator
104104 from art .estimators .object_detection .object_detector import ObjectDetector
105105 from art .estimators .object_detection .pytorch_object_detector import PyTorchObjectDetector
You can’t perform that action at this time.
0 commit comments