gradboard 0.1.18__tar.gz → 0.1.20__tar.gz
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-0.1.18 → gradboard-0.1.20}/PKG-INFO +1 -1
- {gradboard-0.1.18 → gradboard-0.1.20}/gradboard/cycles.py +7 -2
- {gradboard-0.1.18 → gradboard-0.1.20}/pyproject.toml +1 -1
- {gradboard-0.1.18 → gradboard-0.1.20}/LICENSE +0 -0
- {gradboard-0.1.18 → gradboard-0.1.20}/README.md +0 -0
- {gradboard-0.1.18 → gradboard-0.1.20}/gradboard/__init__.py +0 -0
- {gradboard-0.1.18 → gradboard-0.1.20}/gradboard/optimiser.py +0 -0
- {gradboard-0.1.18 → gradboard-0.1.20}/gradboard/scheduler.py +0 -0
|
@@ -47,8 +47,13 @@ def quarter_circle(step: int, total_steps: int) -> float:
|
|
|
47
47
|
# x^2 + y^2 = r^2 = 1
|
|
48
48
|
# Therefore y^2 = 1 - x^2
|
|
49
49
|
# Therefore y^2 = (1 + x)(1 - x)
|
|
50
|
-
y_squared = (1 - x) * (1 + x)
|
|
51
|
-
|
|
50
|
+
y_squared = max(1 - x, 0) * (1 + x)
|
|
51
|
+
try:
|
|
52
|
+
return math.sqrt(y_squared)
|
|
53
|
+
except ValueError:
|
|
54
|
+
print("total_steps: ", total_steps)
|
|
55
|
+
print("step: ", total_steps)
|
|
56
|
+
raise ValueError("Still broken!") from None
|
|
52
57
|
|
|
53
58
|
|
|
54
59
|
def half_cosine(step: int, total_steps: int) -> float:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|