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
a70da86b
Unverified
Commit
a70da86b
authored
Mar 10, 2023
by
J-shang
Committed by
GitHub
Mar 10, 2023
Browse files
Fix hint in src/transformers/modeling_utils.py (#22074)
fix hint
parent
419d979f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/modeling_utils.py
src/transformers/modeling_utils.py
+1
-1
No files found.
src/transformers/modeling_utils.py
View file @
a70da86b
...
@@ -807,7 +807,7 @@ class ModuleUtilsMixin:
...
@@ -807,7 +807,7 @@ class ModuleUtilsMixin:
return
extended_attention_mask
return
extended_attention_mask
def
get_extended_attention_mask
(
def
get_extended_attention_mask
(
self
,
attention_mask
:
Tensor
,
input_shape
:
Tuple
[
int
],
device
:
device
=
None
,
dtype
:
torch
.
float
=
None
self
,
attention_mask
:
Tensor
,
input_shape
:
Tuple
[
int
],
device
:
torch
.
device
=
None
,
dtype
:
torch
.
float
=
None
)
->
Tensor
:
)
->
Tensor
:
"""
"""
Makes broadcastable attention and causal masks so that future and masked tokens are ignored.
Makes broadcastable attention and causal masks so that future and masked tokens are ignored.
...
...
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