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
4f7b434a
Unverified
Commit
4f7b434a
authored
Apr 12, 2024
by
Sergei Belousov
Committed by
GitHub
Apr 12, 2024
Browse files
Update modeling_bark.py (#30221)
Change .view() to .reshape() to prevent errors on non-contiguous tensors
parent
bf9a7ab9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/models/bark/modeling_bark.py
src/transformers/models/bark/modeling_bark.py
+1
-1
No files found.
src/transformers/models/bark/modeling_bark.py
View file @
4f7b434a
...
...
@@ -1068,7 +1068,7 @@ class BarkCoarseModel(BarkCausalModel):
x_coarse_history
[
n
,
:]
+=
codebook_size
*
n
# flatten x_coarse_history
x_coarse_history
=
torch
.
transpose
(
x_coarse_history
,
0
,
1
).
view
(
-
1
)
x_coarse_history
=
torch
.
transpose
(
x_coarse_history
,
0
,
1
).
reshape
(
-
1
)
x_coarse_history
=
x_coarse_history
+
semantic_generation_config
.
semantic_vocab_size
...
...
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