提交 307dd366 编写于 作者: wgzqz's avatar wgzqz

Remove scale_input.

上级 567db428
...@@ -60,15 +60,14 @@ class Attack(object): ...@@ -60,15 +60,14 @@ class Attack(object):
if adversary.is_targeted_attack and adversary.target_label is None: if adversary.is_targeted_attack and adversary.target_label is None:
if adversary.target is None: if adversary.target is None:
raise ValueError( raise ValueError(
'When adversary.is_targeted_attack is True, ' 'When adversary.is_targeted_attack is true, '
'adversary.target_label or adversary.target must be set.') 'adversary.target_label or adversary.target must be set.')
else: else:
adversary.target_label_label = np.argmax( adversary.target_label = np.argmax(
self.model.predict( self.model.predict(adversary.target))
self.model.scale_input(adversary.target)))
logging.info('adversary:\noriginal_label: {}' logging.info('adversary:\noriginal_label: {}'
'\n target_lable: {}' '\n target_label: {}'
'\n is_targeted_attack: {}' '\n is_targeted_attack: {}'
''.format(adversary.original_label, adversary.target_label, ''.format(adversary.original_label, adversary.target_label,
adversary.is_targeted_attack)) adversary.is_targeted_attack))
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册