Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
47a97683
Unverified
Commit
47a97683
authored
Jun 18, 2021
by
Suraj Patil
Committed by
GitHub
Jun 18, 2021
Browse files
[FlaxBart] few small fixes (#12247)
* boom boom * remove flax clip example * few small fixes
parent
f74655cd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
src/transformers/models/bart/modeling_flax_bart.py
src/transformers/models/bart/modeling_flax_bart.py
+1
-3
No files found.
src/transformers/models/bart/modeling_flax_bart.py
View file @
47a97683
...
@@ -595,7 +595,7 @@ class FlaxBartDecoderLayerCollection(nn.Module):
...
@@ -595,7 +595,7 @@ class FlaxBartDecoderLayerCollection(nn.Module):
self
.
layers
=
[
self
.
layers
=
[
FlaxBartDecoderLayer
(
self
.
config
,
name
=
str
(
i
),
dtype
=
self
.
dtype
)
for
i
in
range
(
self
.
config
.
decoder_layers
)
FlaxBartDecoderLayer
(
self
.
config
,
name
=
str
(
i
),
dtype
=
self
.
dtype
)
for
i
in
range
(
self
.
config
.
decoder_layers
)
]
]
self
.
layerdrop
=
self
.
config
.
e
n
coder_layerdrop
self
.
layerdrop
=
self
.
config
.
d
ecoder_layerdrop
def
__call__
(
def
__call__
(
self
,
self
,
...
@@ -692,7 +692,6 @@ class FlaxBartEncoder(nn.Module):
...
@@ -692,7 +692,6 @@ class FlaxBartEncoder(nn.Module):
def
setup
(
self
):
def
setup
(
self
):
self
.
dropout_layer
=
nn
.
Dropout
(
rate
=
self
.
config
.
dropout
)
self
.
dropout_layer
=
nn
.
Dropout
(
rate
=
self
.
config
.
dropout
)
self
.
layerdrop
=
self
.
config
.
encoder_layerdrop
embed_dim
=
self
.
config
.
d_model
embed_dim
=
self
.
config
.
d_model
self
.
padding_idx
=
self
.
config
.
pad_token_id
self
.
padding_idx
=
self
.
config
.
pad_token_id
...
@@ -766,7 +765,6 @@ class FlaxBartDecoder(nn.Module):
...
@@ -766,7 +765,6 @@ class FlaxBartDecoder(nn.Module):
def
setup
(
self
):
def
setup
(
self
):
self
.
dropout_layer
=
nn
.
Dropout
(
rate
=
self
.
config
.
dropout
)
self
.
dropout_layer
=
nn
.
Dropout
(
rate
=
self
.
config
.
dropout
)
self
.
layerdrop
=
self
.
config
.
decoder_layerdrop
embed_dim
=
self
.
config
.
d_model
embed_dim
=
self
.
config
.
d_model
self
.
padding_idx
=
self
.
config
.
pad_token_id
self
.
padding_idx
=
self
.
config
.
pad_token_id
...
...
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