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
90430ae7
Commit
90430ae7
authored
Mar 18, 2019
by
lukovnikov
Browse files
Merge remote-tracking branch 'origin/master'
# Conflicts: # pytorch_pretrained_bert/optimization.py
parents
bed6408d
20e65220
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
2 deletions
+1
-2
pytorch_pretrained_bert/__init__.py
pytorch_pretrained_bert/__init__.py
+1
-1
pytorch_pretrained_bert/optimization.py
pytorch_pretrained_bert/optimization.py
+0
-1
No files found.
pytorch_pretrained_bert/__init__.py
View file @
90430ae7
...
...
@@ -18,7 +18,7 @@ from .modeling_gpt2 import (GPT2Config, GPT2Model,
GPT2LMHeadModel
,
GPT2DoubleHeadsModel
,
load_tf_weights_in_gpt2
)
from
.optimization
import
BertAdam
from
.optimization
import
*
from
.optimization_openai
import
OpenAIAdam
from
.file_utils
import
PYTORCH_PRETRAINED_BERT_CACHE
,
cached_path
pytorch_pretrained_bert/optimization.py
View file @
90430ae7
...
...
@@ -26,7 +26,6 @@ logger = logging.getLogger(__name__)
def
warmup_cosine
(
x
,
warmup
=
0.002
):
if
x
<
warmup
:
return
x
/
warmup
x_
=
(
x
-
warmup
)
/
(
1
-
warmup
)
# progress after warmup
return
0.5
*
(
1.
+
math
.
cos
(
math
.
pi
*
x_
))
...
...
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