Commit feeb0bf1 authored by Pavlo Beylin's avatar Pavlo Beylin
Browse files

Activate noise and brightness transformation.

parent ab0bc76f
......@@ -145,7 +145,7 @@ class PatchTransformer(nn.Module):
noise = torch.cuda.FloatTensor(adv_batch.size()).uniform_(-1, 1) * self.noise_factor
# Apply contrast/brightness/noise, clamp
adv_batch = adv_batch # * contrast + brightness + noise
adv_batch = adv_batch * contrast + brightness + noise
adv_batch = torch.clamp(adv_batch, 0.000001, 0.99999)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment