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
4475f1dc
Unverified
Commit
4475f1dc
authored
Sep 01, 2021
by
Patrick von Platen
Committed by
GitHub
Sep 01, 2021
Browse files
[Flax] Fix BigBird (#13380)
* finish * finish
parent
ecd53971
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
src/transformers/models/big_bird/modeling_flax_big_bird.py
src/transformers/models/big_bird/modeling_flax_big_bird.py
+1
-0
No files found.
src/transformers/models/big_bird/modeling_flax_big_bird.py
View file @
4475f1dc
...
@@ -2029,6 +2029,7 @@ class FlaxBigBirdForQuestionAnswering(FlaxBigBirdPreTrainedModel):
...
@@ -2029,6 +2029,7 @@ class FlaxBigBirdForQuestionAnswering(FlaxBigBirdPreTrainedModel):
if
token_type_ids
is
None
:
if
token_type_ids
is
None
:
token_type_ids
=
(
~
logits_mask
).
astype
(
"i4"
)
token_type_ids
=
(
~
logits_mask
).
astype
(
"i4"
)
logits_mask
=
jnp
.
expand_dims
(
logits_mask
,
axis
=
2
)
logits_mask
=
jnp
.
expand_dims
(
logits_mask
,
axis
=
2
)
logits_mask
=
jax
.
ops
.
index_update
(
logits_mask
,
jax
.
ops
.
index
[:,
0
],
False
)
# init input tensors if not passed
# init input tensors if not passed
if
token_type_ids
is
None
:
if
token_type_ids
is
None
:
...
...
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