Update train.py (#4136)

* Refactor train.py

* Update imports

* Update imports

* Update optimizer

* cleanup
This commit is contained in:
Glenn Jocher authored and GitHub committed 2021-07-24 16:11:39 +02:00
1 parent 264be1a616
commit 63dd65e7ed
3 files changed
+49 -59

No files matched your search

+1 -1
View File
@@ -301,7 +301,7 @@ def clean_str(s):
def one_cycle(y1=0.0, y2=1.0, steps=100):
# lambda function for sinusoidal ramp from y1 to y2
# lambda function for sinusoidal ramp from y1 to y2 https://arxiv.org/pdf/1812.01187.pdf
return lambda x: ((1 - math.cos(x * math.pi / steps)) / 2) * (y2 - y1) + y1