gradboard 0.1.8__py3-none-any.whl → 0.1.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of gradboard might be problematic. Click here for more details.
- gradboard/cycles.py +18 -0
- {gradboard-0.1.8.dist-info → gradboard-0.1.10.dist-info}/METADATA +1 -1
- gradboard-0.1.10.dist-info/RECORD +8 -0
- gradboard-0.1.8.dist-info/RECORD +0 -8
- {gradboard-0.1.8.dist-info → gradboard-0.1.10.dist-info}/LICENSE +0 -0
- {gradboard-0.1.8.dist-info → gradboard-0.1.10.dist-info}/WHEEL +0 -0
gradboard/cycles.py
CHANGED
|
@@ -178,6 +178,7 @@ class Cycle:
|
|
|
178
178
|
|
|
179
179
|
return list(zip(widths, heights, strict=True))
|
|
180
180
|
|
|
181
|
+
@property
|
|
181
182
|
def stats(self) -> float:
|
|
182
183
|
"""
|
|
183
184
|
Returns the area (as a percentage of the area of a curve where the learning
|
|
@@ -271,3 +272,20 @@ class CycleSequence:
|
|
|
271
272
|
|
|
272
273
|
def __len__(self):
|
|
273
274
|
return self.total_steps
|
|
275
|
+
|
|
276
|
+
@property
|
|
277
|
+
def stats(self) -> float:
|
|
278
|
+
"""
|
|
279
|
+
Returns the area (as a percentage of the area of a curve where the learning
|
|
280
|
+
rate is constant max_lr), percentage ascent steps and percentage descent
|
|
281
|
+
steps of a learning rate schedule.
|
|
282
|
+
"""
|
|
283
|
+
cycle_ratios = [c.total_steps for c in self.cycles]
|
|
284
|
+
cycle_stats = {k: v * cycle_ratios[0] for k, v in self.cycles[0].stats.items()}
|
|
285
|
+
for i, cycle in enumerate(self.cycles):
|
|
286
|
+
if i == 0:
|
|
287
|
+
continue # We already did the first one, above
|
|
288
|
+
for k, v in cycle.stats.items():
|
|
289
|
+
cycle_stats[k] += cycle_ratios[i] * v
|
|
290
|
+
|
|
291
|
+
return {k: v / self.total_steps for k, v in cycle_stats.items()}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
gradboard/__init__.py,sha256=57AkHusYwLCsusiVnajH5pMFKioRCj-3IjF9qpdOzE0,69
|
|
2
|
+
gradboard/cycles.py,sha256=dy3qr4kUPPmB0g3L-E1CMYZSuw6son6fIvyu9uUJglQ,9682
|
|
3
|
+
gradboard/optimiser.py,sha256=Iw1piQkQkWdNUW8d9f3iPrvP9qEGVxEKmerK7ATDgOI,6189
|
|
4
|
+
gradboard/scheduler.py,sha256=W146MgdTYz113R3M0qhVpk8kr6L1ioPS3pCFc3MhKYg,6507
|
|
5
|
+
gradboard-0.1.10.dist-info/LICENSE,sha256=0BAzJE5BqQ7Iixp_AFdB2W1uO-HCRX-Qfun8PHt6yVM,1073
|
|
6
|
+
gradboard-0.1.10.dist-info/METADATA,sha256=4ygT3hkBfJWE0jP27o0CxcCwW86x69V2n3kKYMzkupU,2174
|
|
7
|
+
gradboard-0.1.10.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
8
|
+
gradboard-0.1.10.dist-info/RECORD,,
|
gradboard-0.1.8.dist-info/RECORD
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
gradboard/__init__.py,sha256=57AkHusYwLCsusiVnajH5pMFKioRCj-3IjF9qpdOzE0,69
|
|
2
|
-
gradboard/cycles.py,sha256=8mdqRDCVI6kUEqCcLOo99pzwMngsRNZI-JwrYucpadQ,8927
|
|
3
|
-
gradboard/optimiser.py,sha256=Iw1piQkQkWdNUW8d9f3iPrvP9qEGVxEKmerK7ATDgOI,6189
|
|
4
|
-
gradboard/scheduler.py,sha256=W146MgdTYz113R3M0qhVpk8kr6L1ioPS3pCFc3MhKYg,6507
|
|
5
|
-
gradboard-0.1.8.dist-info/LICENSE,sha256=0BAzJE5BqQ7Iixp_AFdB2W1uO-HCRX-Qfun8PHt6yVM,1073
|
|
6
|
-
gradboard-0.1.8.dist-info/METADATA,sha256=F286NyzEeIX1TKEhh8otKWko_jtCeHBsIwJKE5pi-vw,2173
|
|
7
|
-
gradboard-0.1.8.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
8
|
-
gradboard-0.1.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|