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
90246133
"...slim/git@developer.sourcefind.cn:wangsen/paddle_dbnet.git" did not exist on "55d8af94f52dc8fd4c6356ef98c5a703e2870dbf"
Commit
90246133
authored
Mar 12, 2019
by
lukovnikov
Browse files
changing docker
parent
baf66d14
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
pytorch_pretrained_bert/optimization.py
pytorch_pretrained_bert/optimization.py
+2
-2
No files found.
pytorch_pretrained_bert/optimization.py
View file @
90246133
...
...
@@ -69,7 +69,7 @@ class WarmupCosineSchedule(LRSchedule):
return
progress
/
self
.
warmup
else
:
progress
=
(
progress
-
self
.
warmup
)
/
(
1
-
self
.
warmup
)
# progress after warmup
return
0.5
*
(
1.
+
math
.
cos
(
math
.
pi
*
((
self
.
cycles
*
2
*
progress
)
%
1
)
)
return
0.5
*
(
1.
+
math
.
cos
(
math
.
pi
*
self
.
cycles
*
2
*
progress
))
class
WarmupCosineWithRestartsSchedule
(
WarmupCosineSchedule
):
...
...
@@ -84,7 +84,7 @@ class WarmupCosineWithRestartsSchedule(WarmupCosineSchedule):
return
progress
/
self
.
warmup
else
:
progress
=
(
progress
-
self
.
warmup
)
/
(
1
-
self
.
warmup
)
# progress after warmup
ret
=
0.5
*
(
1.
+
math
.
cos
(
math
.
pi
*
self
.
cycles
*
2
*
progress
))
ret
=
0.5
*
(
1.
+
math
.
cos
(
math
.
pi
*
((
self
.
cycles
*
2
*
progress
)
%
1
))
)
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