-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtracker.py
More file actions
61 lines (49 loc) · 1.51 KB
/
tracker.py
File metadata and controls
61 lines (49 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
class Diary(object):
def __init__(self, image, label, targeted_label):
self.true_label = label
self.original = image
self.targeted_label = targeted_label
self.initial_image = None
self.initial_projection = None
self.calls_initialization = None
self.calls_initial_bin_search = None
self.epoch_start = None
self.epoch_initialization = None
self.epoch_initial_bin_search = None
self.iterations = list()
class DiaryPage(object):
def __init__(self):
self.distance = None
self.num_eval_det = None
self.num_eval_prob = None
self.approx_grad = None
self.opposite = None
self.bin_search = None
self.info_max_stats = None
self.calls: Calls = Calls()
self.time: Time = Time()
self.grad_estimate = None
self.grad_true = None
class InfoMaxStats(object):
def __init__(self, s, tmap, samples, e, n):
self.s = s
self.e = e
self.n = n
self.tmap = tmap
self.samples = samples
class Time(object):
def __init__(self):
self.start = None
self.num_evals = None
self.approx_grad = None
self.step_search = None
self.opposite = None
self.bin_search = None
self.end = None
class Calls(object):
def __init__(self):
self.start = None
self.initial_projection = None
self.approx_grad = None
self.step_search = None
self.bin_search = None