MCPcopy Create free account
hub / github.com/CausalLearning/robust-unlearnable-examples / __init__

Method __init__

attacks/pgd_attacker.py:5–11  ·  view source on GitHub ↗
(self, radius, steps, step_size, random_start, norm_type, ascending=True)

Source from the content-addressed store, hash-verified

3
4class 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:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected