This commit is contained in:
Nataniel Ruiz
2019-12-24 12:52:17 -04:00
parent f665283dfa
commit 4f81836324
+1
View File
@@ -635,6 +635,7 @@ class Solver(object):
l1_error += F.l1_loss(gen, gen_noattack)
l2_error += F.mse_loss(gen, gen_noattack)
print((gen - gen_noattack).data[0].cpu(), (gen - gen_noattack).data[0].cpu().shape)
l0_error += np.linalg.norm((gen - gen_noattack).data[0].cpu(), ord=0)
min_dist += attacks.min_dist((gen - gen_noattack).data[0].cpu(), ord='-inf')
n_samples += 1