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
471daf1b
Commit
471daf1b
authored
Mar 12, 2019
by
lukovnikov
Browse files
changing docker
parent
90246133
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
pytorch_pretrained_bert/optimization.py
pytorch_pretrained_bert/optimization.py
+1
-1
No files found.
pytorch_pretrained_bert/optimization.py
View file @
471daf1b
...
@@ -84,7 +84,7 @@ class WarmupCosineWithRestartsSchedule(WarmupCosineSchedule):
...
@@ -84,7 +84,7 @@ class WarmupCosineWithRestartsSchedule(WarmupCosineSchedule):
return
progress
/
self
.
warmup
return
progress
/
self
.
warmup
else
:
else
:
progress
=
(
progress
-
self
.
warmup
)
/
(
1
-
self
.
warmup
)
# progress after warmup
progress
=
(
progress
-
self
.
warmup
)
/
(
1
-
self
.
warmup
)
# progress after warmup
ret
=
0.5
*
(
1.
+
math
.
cos
(
math
.
pi
*
((
self
.
cycles
*
2
*
progress
)
%
1
)))
ret
=
0.5
*
(
1.
+
math
.
cos
(
math
.
pi
*
((
self
.
cycles
*
progress
)
%
1
)))
return
ret
return
ret
...
...
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