-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use padding_idx=None for nn.Embedding() in the decoder model #1206
Comments
csukuangfj
added a commit
to csukuangfj/sherpa
that referenced
this issue
Aug 25, 2023
csukuangfj
added a commit
to k2-fsa/sherpa
that referenced
this issue
Aug 25, 2023
I don't understand that we train the model use [0,0], why we decode by [-1,0]? blank_id = self.decoder.blank_id
sos_y = add_sos(y, sos_id=blank_id)
# sos_y_padded: [B, S + 1], start with SOS.
sos_y_padded = sos_y.pad(mode="constant", padding_value=blank_id)
|
please think about the input of the conv module in the decoder model. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We need to change sherpa/sherpa-onnx/sherpa-ncnn to use
[-1, 0]
as the initial tokens during decoding instead of[0, 0]
.The consequence is that if we need to re-export the model, otherwise it will cause runtime error saying that
If we don't change sherpa/sherpa-onnx/sherpa-ncnn, a user has reported that the WER becomes worse.
The text was updated successfully, but these errors were encountered: