def __init__(self, targeted=True, search_steps=None, max_steps=None, cuda=True, debug=False):
self.debug = debug
self.targeted = targeted
self.num_classes = 1000
self.confidence = 20 # FIXME need to find a good value for this, 0 value used in paper not doing much...
self.initial_const = 0.1 # bumped up from default of .01 in reference code
self.binary_search_steps = search_steps or 5
self.repeat = self.binary_search_steps >= 10
self.max_steps = max_steps or 1000
self.abort_early = True
self.clip_min = -1.
self.clip_max = 1.
self.cuda = cuda
self.clamp_fn = 'tanh' # set to something else perform a simple clamp instead of tanh
self.init_rand = False # an experiment, does a random starting point help?
attack_carlini_wagner_l2.py 文件源码
python
阅读 32
收藏 0
点赞 0
评论 0
评论列表
文章目录