Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
56a47ce2
Commit
56a47ce2
authored
Apr 25, 2019
by
lukovnikov
Browse files
- replaced OpenAIGPTAdam with OpenAIAdam in docs
parent
331a46ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
14 deletions
+0
-14
tests/optimization_test.py
tests/optimization_test.py
+0
-14
No files found.
tests/optimization_test.py
View file @
56a47ce2
...
@@ -87,19 +87,5 @@ class WarmupCosineWithRestartsTest(unittest.TestCase):
...
@@ -87,19 +87,5 @@ class WarmupCosineWithRestartsTest(unittest.TestCase):
self
.
assertTrue
(
np
.
allclose
(
expected_zeros
,
0
))
self
.
assertTrue
(
np
.
allclose
(
expected_zeros
,
0
))
class
TestSchedulePlot
(
unittest
.
TestCase
):
def
test_plot_schedule
(
self
):
import
matplotlib
as
mpl
from
matplotlib
import
pyplot
as
plt
m
=
WarmupCosineWithWarmupRestartsSchedule
(
warmup
=
.
1
,
t_total
=
1000.
,
cycles
=
3.
)
x
=
np
.
arange
(
0
,
1000
)
y
=
[
m
.
get_lr
(
xe
)
for
xe
in
x
]
y
=
np
.
asarray
(
y
)
plt
.
figure
(
figsize
=
(
9
,
2
))
plt
.
plot
(
y
)
#plt.grid(True)
plt
.
show
()
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
unittest
.
main
()
unittest
.
main
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment