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
f113a2df
"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "36010cb1e2bce127196bc09066f17d14c400cb1f"
Commit
f113a2df
authored
Mar 09, 2019
by
lukovnikov
Browse files
readme de
parent
90a41dbe
Changes
1
Show 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 @
f113a2df
...
@@ -118,7 +118,7 @@ class BertAdam(Optimizer):
...
@@ -118,7 +118,7 @@ class BertAdam(Optimizer):
max_grad_norm
=
1.0
):
max_grad_norm
=
1.0
):
if
lr
is
not
required
and
lr
<
0.0
:
if
lr
is
not
required
and
lr
<
0.0
:
raise
ValueError
(
"Invalid learning rate: {} - should be >= 0.0"
.
format
(
lr
))
raise
ValueError
(
"Invalid learning rate: {} - should be >= 0.0"
.
format
(
lr
))
if
schedule
not
in
SCHEDULES
:
if
not
isinstance
(
schedule
,
LRSchedule
)
and
schedule
not
in
SCHEDULES
:
raise
ValueError
(
"Invalid schedule parameter: {}"
.
format
(
schedule
))
raise
ValueError
(
"Invalid schedule parameter: {}"
.
format
(
schedule
))
if
not
0.0
<=
b1
<
1.0
:
if
not
0.0
<=
b1
<
1.0
:
raise
ValueError
(
"Invalid b1 parameter: {} - should be in [0.0, 1.0["
.
format
(
b1
))
raise
ValueError
(
"Invalid b1 parameter: {} - should be in [0.0, 1.0["
.
format
(
b1
))
...
...
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