Skip to content

Commit

Permalink
[Fix] transpose use numpy (#3933)
Browse files Browse the repository at this point in the history
  • Loading branch information
megemini authored Dec 5, 2024
1 parent c0fafd0 commit ff539ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paddlespeech/s2t/models/wav2vec2/modules/wav2vec2_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,7 @@ def __init__(self, deconstruct_idx=None):
def forward(self, x):
if self.deconstruct_idx is not None:
x = x[self.deconstruct_idx]
trans_dim = paddle.arange(x.dim())
trans_dim = np.arange(x.dim())
trans_dim[-1], trans_dim[-2] = trans_dim[-2], trans_dim[-1]
return x.transpose(trans_dim)

Expand Down

0 comments on commit ff539ef

Please sign in to comment.