We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
def seg_ctc_ent_loss_log(pred, pred_len, token, token_len, uniform_mask, blank=0): 您好!我看到blank变量并没有在函数内部提及,而且我所设定的blank!=0,这是怎么回事?还是说不建议使用seg_ctc_ent_loss_log?使用ctc_ent_loss_log比较好,ctc_ent_loss_log的blank变量在函数内部有提及,可以改! 如能有回复,非常感谢!!!
The text was updated successfully, but these errors were encountered:
我觉得这里是有问题的,我是这样修改的,你可以参考
token_with_blank = torch.nn.functional.pad(target.unsqueeze(1), pad=(0, 1, 1, 0), mode='constant', value=blank).flatten()[1:] token_with_blank = token_with_blank.contiguous() length = token_with_blank.shape[0] ctc_log_prob = ctc_log_prob[:, token_with_blank]
Sorry, something went wrong.
No branches or pull requests
def seg_ctc_ent_loss_log(pred, pred_len, token, token_len, uniform_mask, blank=0):
您好!我看到blank变量并没有在函数内部提及,而且我所设定的blank!=0,这是怎么回事?还是说不建议使用seg_ctc_ent_loss_log?使用ctc_ent_loss_log比较好,ctc_ent_loss_log的blank变量在函数内部有提及,可以改!
如能有回复,非常感谢!!!
The text was updated successfully, but these errors were encountered: