remove some deprecated codes
@@ -943,7 +943,6 @@ class SaliencyMapMethod(Attack):
def parse_params(self,
theta=1.,
gamma=1.,
- nb_classes=None,
clip_min=0.,
clip_max=1.,
y_target=None,
@@ -958,15 +957,10 @@ class SaliencyMapMethod(Attack):
:param theta: (optional float) Perturbation introduced to modified
components (can be positive or negative)
:param gamma: (optional float) Maximum percentage of perturbed features
- :param nb_classes: (optional int) Number of model output classes
:param clip_min: (optional float) Minimum component value for clipping
:param clip_max: (optional float) Maximum component value for clipping
:param y_target: (optional) Target tensor if the attack is targeted
"""
-
- if nb_classes is not None:
- warnings.warn("The nb_classes argument is depricated and will "
- "be removed on 2018-02-11")
self.theta = theta
self.gamma = gamma
self.clip_min = clip_min
@@ -1149,7 +1143,6 @@ class CarliniWagnerL2(Attack):
def parse_params(self,
y=None,
y_target=None,
- nb_classes=None,
batch_size=1,
confidence=0,
learning_rate=5e-3,
@@ -1161,9 +1154,6 @@ class CarliniWagnerL2(Attack):
clip_max=1):
# ignore the y and y_target argument
- if nb_classes is not None:
- warnings.warn("The nb_classes argument is depricated and will "
- "be removed on 2018-02-11")
self.batch_size = batch_size
self.confidence = confidence
self.learning_rate = learning_rate
@@ -1279,7 +1269,6 @@ class ElasticNetMethod(Attack):
def parse_params(self,
y=None,
y_target=None,
- nb_classes=None,
beta=1e-2,
decision_rule='EN',
batch_size=1,
@@ -1293,9 +1282,6 @@ class ElasticNetMethod(Attack):
clip_max=1):
# ignore the y and y_target argument
- if nb_classes is not None:
- warnings.warn("The nb_classes argument is depricated and will "
- "be removed on 2018-02-11")
self.beta = beta
self.decision_rule = decision_rule
self.batch_size = batch_size
@@ -1378,7 +1364,6 @@ class DeepFool(Attack):
nb_candidate=10,
overshoot=0.02,
max_iter=50,
- nb_classes=None,
clip_min=0.,
clip_max=1.,
**kwargs):
@@ -1390,13 +1375,9 @@ class DeepFool(Attack):
confidence during implementation.
:param overshoot: A termination criterion to prevent vanishing updates
:param max_iter: Maximum number of iteration for deepfool
- :param nb_classes: The number of model output classes
:param clip_min: Minimum component value for clipping
:param clip_max: Maximum component value for clipping
"""
- if nb_classes is not None:
- warnings.warn("The nb_classes argument is depricated and will "
- "be removed on 2018-02-11")
self.nb_candidate = nb_candidate
self.overshoot = overshoot
self.max_iter = max_iter
