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
2b574e7c
Unverified
Commit
2b574e7c
authored
Oct 06, 2020
by
Sam Shleifer
Committed by
GitHub
Oct 06, 2020
Browse files
[bart] fix config.classif_dropout (#7593)
parent
aa6c3c14
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
notebooks/05-benchmark.ipynb
notebooks/05-benchmark.ipynb
+1
-1
src/transformers/configuration_bart.py
src/transformers/configuration_bart.py
+1
-1
src/transformers/modeling_bart.py
src/transformers/modeling_bart.py
+1
-1
No files found.
notebooks/05-benchmark.ipynb
View file @
2b574e7c
...
@@ -1658,7 +1658,7 @@
...
@@ -1658,7 +1658,7 @@
" 'add_final_layer_norm': False,\n",
" 'add_final_layer_norm': False,\n",
" 'attention_dropout': 0.0,\n",
" 'attention_dropout': 0.0,\n",
" 'bos_token_id': 0,\n",
" 'bos_token_id': 0,\n",
" 'classif_dropout': 0.0,\n",
" 'classif
ier
_dropout': 0.0,\n",
" 'd_model': 1024,\n",
" 'd_model': 1024,\n",
" 'decoder_attention_heads': 16,\n",
" 'decoder_attention_heads': 16,\n",
" 'decoder_ffn_dim': 4096,\n",
" 'decoder_ffn_dim': 4096,\n",
...
...
src/transformers/configuration_bart.py
View file @
2b574e7c
...
@@ -195,7 +195,7 @@ class BartConfig(PretrainedConfig):
...
@@ -195,7 +195,7 @@ class BartConfig(PretrainedConfig):
self
.
dropout
=
dropout
self
.
dropout
=
dropout
# Classifier stuff
# Classifier stuff
self
.
classif_dropout
=
classifier_dropout
self
.
classif
ier
_dropout
=
classifier_dropout
# pos embedding offset
# pos embedding offset
self
.
extra_pos_embeddings
=
self
.
pad_token_id
+
1
self
.
extra_pos_embeddings
=
self
.
pad_token_id
+
1
...
...
src/transformers/modeling_bart.py
View file @
2b574e7c
...
@@ -1176,7 +1176,7 @@ class BartForSequenceClassification(PretrainedBartModel):
...
@@ -1176,7 +1176,7 @@ class BartForSequenceClassification(PretrainedBartModel):
config
.
d_model
,
config
.
d_model
,
config
.
d_model
,
config
.
d_model
,
config
.
num_labels
,
config
.
num_labels
,
config
.
classif_dropout
,
config
.
classif
ier
_dropout
,
)
)
self
.
model
.
_init_weights
(
self
.
classification_head
.
dense
)
self
.
model
.
_init_weights
(
self
.
classification_head
.
dense
)
self
.
model
.
_init_weights
(
self
.
classification_head
.
out_proj
)
self
.
model
.
_init_weights
(
self
.
classification_head
.
out_proj
)
...
...
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