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
74d78bee
Commit
74d78bee
authored
Aug 28, 2019
by
VictorSanh
Browse files
fix: add qa_dropout and seq_classif_dropout
parent
7f5d8534
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
pytorch_transformers/modeling_dilbert.py
pytorch_transformers/modeling_dilbert.py
+4
-0
No files found.
pytorch_transformers/modeling_dilbert.py
View file @
74d78bee
...
@@ -61,6 +61,8 @@ class DilBertConfig(PretrainedConfig):
...
@@ -61,6 +61,8 @@ class DilBertConfig(PretrainedConfig):
activation
=
'gelu'
,
activation
=
'gelu'
,
initializer_range
=
0.02
,
initializer_range
=
0.02
,
tie_weights_
=
True
,
tie_weights_
=
True
,
qa_dropout
=
0.1
,
seq_classif_dropout
=
0.2
,
**
kwargs
):
**
kwargs
):
super
(
DilBertConfig
,
self
).
__init__
(
**
kwargs
)
super
(
DilBertConfig
,
self
).
__init__
(
**
kwargs
)
...
@@ -83,6 +85,8 @@ class DilBertConfig(PretrainedConfig):
...
@@ -83,6 +85,8 @@ class DilBertConfig(PretrainedConfig):
self
.
activation
=
activation
self
.
activation
=
activation
self
.
initializer_range
=
initializer_range
self
.
initializer_range
=
initializer_range
self
.
tie_weights_
=
tie_weights_
self
.
tie_weights_
=
tie_weights_
self
.
qa_dropout
=
qa_dropout
self
.
seq_classif_dropout
=
seq_classif_dropout
else
:
else
:
raise
ValueError
(
"First argument must be either a vocabulary size (int)"
raise
ValueError
(
"First argument must be either a vocabulary size (int)"
" or the path to a pretrained model config file (str)"
)
" or the path to a pretrained model config file (str)"
)
...
...
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