Skip to content

Commit

Permalink
torch.concatenate -> torch.cat for compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jongwook committed Jan 10, 2023
1 parent 28769fc commit f82bc59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion notebooks/Multilingual_ASR.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3608,7 +3608,7 @@
" with torch.no_grad():\n",
" logits = model(mel.unsqueeze(0), tokens.unsqueeze(0))\n",
"\n",
" weights = torch.concatenate(QKs) # layers * heads * tokens * frames \n",
" weights = torch.cat(QKs) # layers * heads * tokens * frames \n",
" weights = weights[:, :, :, : duration // AUDIO_SAMPLES_PER_TOKEN].cpu()\n",
" weights = medfilt(weights, (1, 1, 1, medfilt_width))\n",
" weights = torch.tensor(weights * qk_scale).softmax(dim=-1)\n",
Expand Down

0 comments on commit f82bc59

Please sign in to comment.