mirror of
https://github.com/openai/whisper.git
synced 2025-03-30 14:28:27 +00:00
Use PyTorch as logits transpose for ONNX support (#141)
This commit is contained in:
parent
2037b65f3f
commit
9c8183a179
@ -189,7 +189,7 @@ class TextDecoder(nn.Module):
|
||||
x = block(x, xa, mask=self.mask, kv_cache=kv_cache)
|
||||
|
||||
x = self.ln(x)
|
||||
logits = (x @ self.token_embedding.weight.to(x.dtype).T).float()
|
||||
logits = (x @ torch.transpose(self.token_embedding.weight.to(x.dtype), 0, 1)).float()
|
||||
|
||||
return logits
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user