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
d765717c
Unverified
Commit
d765717c
authored
May 16, 2023
by
Yih-Dar
Committed by
GitHub
May 16, 2023
Browse files
Fix `RwkvModel` (#23392)
fix Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
80ca9247
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/models/rwkv/modeling_rwkv.py
src/transformers/models/rwkv/modeling_rwkv.py
+1
-1
No files found.
src/transformers/models/rwkv/modeling_rwkv.py
View file @
d765717c
...
...
@@ -679,7 +679,7 @@ class RwkvModel(RwkvPreTrainedModel):
all_hidden_states
=
all_hidden_states
+
(
hidden_states
,)
if
not
return_dict
:
return
(
hidden_states
,
state
,
all_hidden_states
,
all_self_attentions
)
return
tuple
(
x
for
x
in
[
hidden_states
,
state
,
all_hidden_states
,
all_self_attentions
]
if
x
is
not
None
)
return
RwkvOutput
(
last_hidden_state
=
hidden_states
,
...
...
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