Update modeling_bark.py (#30221)
Change .view() to .reshape() to prevent errors on non-contiguous tensors
This commit is contained in:
parent
bf9a7ab932
commit
4f7b434acb
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue