Defenses Functions
Adversarial Training
Parameters:
model (tensorflow.keras.Model): The model to defend.
x (numpy.ndarray): The input training examples.
y (numpy.ndarray): The true labels of the training examples.
epsilon (float): The magnitude of the perturbation (default: 0.01).
Returns:
defended_model (tensorflow.keras.Model): The adversarially trained model.Feature Squeezing
Gradient Masking
Input Transformation
Defensive Distillation
Randomized Smoothing
Feature Denoising
Thermometer Encoding
Adversarial Logit Pairing (ALP)
Spatial Smoothing
JPEG Compression
Last updated