Hi, I met some errors when running TTAA code. Could you please re-check your code? Thanks a lot.
gaussian_smoothing is missing
|
from gaussian_smoothing import * |
- there are a lot of variables which are not defined before in train.py.
feature_layer in Line 146, Line 156, and Line 170
feature in Line157
|
_, t_features = l_d(normalize(t_img.clone().detach())) |
|
t_feature = t_features[feature_layer] |
|
t_feature_similarity = f_d(t_feature) |
|
|
|
adv = netG(img.clone()) |
|
|
|
# Projection |
|
adv = torch.min(torch.max(adv, img - eps), img + eps) |
|
adv = torch.clamp(adv, 0.0, 1.0) |
|
|
|
_, s_features = l_d(normalize(adv.clone().detach())) |
|
s_feature = s_features[feature_layer] |
|
s_feature_similarity = f_d(feature) |
t_outputs in Line 161
|
D_real_loss = BCE(t_feature_similarity, torch.ones(t_outputs.shape).detach().to(device)) |
Hi, I met some errors when running TTAA code. Could you please re-check your code? Thanks a lot.
gaussian_smoothingis missingAI-Security/Adversarial Example/TTAA/train.py
Line 17 in 7294840
feature_layerin Line 146, Line 156, and Line 170featurein Line157AI-Security/Adversarial Example/TTAA/train.py
Lines 145 to 157 in 7294840
t_outputsin Line 161AI-Security/Adversarial Example/TTAA/train.py
Line 161 in 7294840