#defences.py from art.defences.detector.evasion.binaryinputdetector import…
- User
#defences.py
from art.defences.detector.evasion.binary_input_detector import BinaryInputDetector #fit x: np.ndarray, y: np.ndarray, batch_size: int = 128, from art.defences.detector.evasion.binary_activation_detector import BinaryActivationDetector #fit x: np.ndarray, y: np.ndarray, batch_size: int = 128, from art.defences.detector.evasion.subsetscanning.detector import SubsetScanningDetector
scan
clean_x: np.ndarray,
adv_x: np.ndarray,
clean_size: int | None = None,
adv_size: int | None = None,
run: int = 10,
from art.defences.postprocessor.class_labels import ClassLabels # __call__preds: np.ndarray from art.defences.postprocessor.gaussian_noise import GaussianNoise #call preds: np.ndarray from art.defences.postprocessor.high_confidence import HighConfidence #call preds: np.ndarray from art.defences.postprocessor.postprocessor import Postprocessor #call preds: np.ndarray from art.defences.postprocessor.reverse_sigmoid import ReverseSigmoid #call preds: np.ndarray from art.defences.postprocessor.rounded import Rounded #call preds: np.ndarray
-----
installation below
num_classes: int, or clip_values: "CLIP_VALUES_TYPE",or both come case
or length: int,
from art.defences.preprocessor.cutmix.cutmix import CutMix #call x: np.ndarray, y: np.ndarray from art.defences.preprocessor.cutmix.cutmix_pytorch import CutMixPyTorch #call x: np.ndarray, y: np.ndarray from art.defences.preprocessor.cutmix.cutmix_tensorflow import CutMixTensorFlowV2#call x: np.ndarray, y: np.ndarray from art.defences.preprocessor.cutout.cutout import Cutout#call x: np.ndarray, y: np.ndarray from art.defences.preprocessor.cutout.cutout_pytorch import CutoutPyTorch#call x: np.ndarray, y: np.ndarray from art.defences.preprocessor.cutout.cutout_tensorflow import CutoutTensorFlowV2#call x: np.ndarray, y: np.ndarray from art.defences.preprocessor.feature_squeezing import FeatureSqueezing#call x: np.ndarray, y: np.ndarray from art.defences.preprocessor.gaussian_augmentation import GaussianAugmentation#call x: np.ndarray, y: np.ndarray from art.defences.preprocessor.inverse_gan import DefenseGAN, InverseGAN#call x: np.ndarray, y: np.ndarray from art.defences.preprocessor.jpeg_compression import JpegCompression#call x: np.ndarray, y: np.ndarray from art.defences.preprocessor.label_smoothing import LabelSmoothing#call x: np.ndarray, y: np.ndarray from art.defences.preprocessor.mixup.mixup import Mixup# x: np.ndarray, y: np.ndarray from art.defences.preprocessor.mixup.mixup_pytorch import MixupPyTorch# x: np.ndarray, y: np.ndarray from art.defences.preprocessor.mixup.mixup_tensorflow import MixupTensorFlowV2# x: np.ndarray, y: np.ndarray from art.defences.preprocessor.mp3_compression import Mp3Compression# x: np.ndarray, y: np.ndarray from art.defences.preprocessor.mp3_compression_pytorch import Mp3CompressionPyTorch# x: np.ndarray, y: np.ndarray from art.defences.preprocessor.pixel_defend import PixelDefend# x: np.ndarray, y: np.ndarray from art.defences.preprocessor.preprocessor import Preprocessor# x: np.ndarray, y: np.ndarray from art.defences.preprocessor.resample import Resample# x: np.ndarray, y: np.ndarray from art.defences.preprocessor.spatial_smoothing import SpatialSmoothing# x: np.ndarray, y: np.ndarray from art.defences.preprocessor.spatial_smoothing_pytorch import SpatialSmoothingPyTorch# x: np.ndarray, y: np.ndarray from art.defences.preprocessor.spatial_smoothing_tensorflow import SpatialSmoothingTensorFlowV2# x: np.ndarray, y: np.ndarray from art.defences.preprocessor.thermometer_encoding import ThermometerEncoding# x: np.ndarray, y: np.ndarray from art.defences.preprocessor.variance_minimization import TotalVarMin# x: np.ndarray, y: np.ndarray from art.defences.preprocessor.video_compression import VideoCompression# x: np.ndarray, y: np.ndarray from art.defences.preprocessor.video_compression_pytorch import VideoCompressionPyTorch# x: np.ndarray, y: np.ndarray
- Assistant