Skip to content

SoftCorrect:eval_detector.py 文件中第95行 assert text_length % 4 == 0 ,是要保证 CTC 多候选序列必须等长吗? #122

Description

@gangkou2020

本人使用 SoftCorrect 对 wenet 的 CTC 多候选序列进行纠错时遇到以下问题:

test checkpoints/detector_finetune/checkpoint16.pt
infile_list: ['test']
Setting word embedding dropout of encoder to 0.0
Decoder not exit! Using bos eos from encoder!
werdur_max_predict:  5.0
werdur_loss_type:  l2
eval_data/aishell_nbest_eval_detector/test/aligned_nbest_token_raw.data.json	一 二 线 城 市 虽 然 也 处 于 调 整 中 一 二 线 城 市 虽 杨 也 处 于 调 整 中 一 二 线 城 市 孙 然 也 处 于 调 整 中 一 二 线 城 市 虽 然 也 处 于 调 整

Traceback (most recent call last):
  File "eval_detector.py", line 95, in <module>
    assert text_length % 4 == 0
AssertionError

请问是必须保证这几个候选序列等长吗,还是有其他考虑?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions