(self, radius, steps, step_size, random_start, norm_type, ascending=True)
| 3 | |
| 4 | class PGDAttacker(): |
| 5 | def __init__(self, radius, steps, step_size, random_start, norm_type, ascending=True): |
| 6 | self.radius = radius / 255. |
| 7 | self.steps = steps |
| 8 | self.step_size = step_size / 255. |
| 9 | self.random_start = random_start |
| 10 | self.norm_type = norm_type |
| 11 | self.ascending = ascending |
| 12 | |
| 13 | def perturb(self, model, criterion, x, y): |
| 14 | if self.steps==0 or self.radius==0: |
nothing calls this directly
no outgoing calls
no test coverage detected