2365934c716af1c923a185ca0ad0ae1855108eb3,art/attacks/evasion/imperceptible_asr/imperceptible_attack_pytorch.py,ImperceptibleAttackPytorch,_partial_forward,#ImperceptibleAttackPytorch#Any#,174
Before Change
from torch.autograd import Variable
global_delta = Variable(np.zeros((batch_size, FLAGS.max_length_dataset), dtype=np.float32),
name="qq_delta")
def _attack_1st_stage(self):
return
After Change
from torch.autograd import Variable
self.global_delta = Variable(
x=torch.zeros(self.batch_size, self.global_max_length).type(torch.FloatTensor),
requires_grad=True
)
self.global_delta.to(self.estimator.device)
def _attack_1st_stage(self):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 2365934c716af1c923a185ca0ad0ae1855108eb3
Time: 2020-09-08
Author: M.N.Tran@ibm.com
File Name: art/attacks/evasion/imperceptible_asr/imperceptible_attack_pytorch.py
Class Name: ImperceptibleAttackPytorch
Method Name: _partial_forward
Project Name: pytorch/examples
Commit Name: a7a5cdc598afd6afa3d0e9d355360bebc4947c29
Time: 2017-01-24
Author: bryan.mccann.is@gmail.com
File Name: snli/model.py
Class Name: Encoder
Method Name: forward