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
0d1ba2dd
Unverified
Commit
0d1ba2dd
authored
Sep 19, 2022
by
Partho
Committed by
GitHub
Sep 19, 2022
Browse files
added type hints (#19076)
parent
6f25d107
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/transformers/models/sew_d/modeling_sew_d.py
src/transformers/models/sew_d/modeling_sew_d.py
+5
-5
No files found.
src/transformers/models/sew_d/modeling_sew_d.py
View file @
0d1ba2dd
...
@@ -1194,11 +1194,11 @@ class SEWDEncoder(nn.Module):
...
@@ -1194,11 +1194,11 @@ class SEWDEncoder(nn.Module):
def
forward
(
def
forward
(
self
,
self
,
hidden_states
,
hidden_states
:
torch
.
tensor
,
attention_mask
=
None
,
attention_mask
:
Optional
[
torch
.
Tensor
]
=
None
,
output_attentions
=
False
,
output_attentions
:
bool
=
False
,
output_hidden_states
=
False
,
output_hidden_states
:
bool
=
False
,
return_dict
=
True
,
return_dict
:
bool
=
True
,
):
):
max_encoder_length
=
hidden_states
.
shape
[
1
]
//
self
.
config
.
squeeze_factor
max_encoder_length
=
hidden_states
.
shape
[
1
]
//
self
.
config
.
squeeze_factor
if
attention_mask
is
None
:
if
attention_mask
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