next
This commit is contained in:
+1
-3
@@ -616,14 +616,12 @@ class Solver(object):
|
||||
x_advs.append((x_adv, perturb))
|
||||
break
|
||||
|
||||
print(len(x_advs))
|
||||
for idx, c_trg in enumerate(c_trg_list):
|
||||
print(idx)
|
||||
with torch.no_grad():
|
||||
gen_noattack, gen_noattack_feats = self.G(x_real, c_trg)
|
||||
# Attack
|
||||
# x_adv, perturb = pgd_attack.perturb(x_real, black, c_trg)
|
||||
_, perturb = x_advs[idx]
|
||||
# _, perturb = x_advs[idx]
|
||||
x_adv = x_real + perturb
|
||||
# x_adv = self.blur_tensor(x_adv)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user