()
| 62 | |
| 63 | |
| 64 | def test_textdecoder_ctc(): |
| 65 | chars_dict = {"<PAD>": 0, "<EOS>": 1, "A": 2, "B": 3, "C": 4} |
| 66 | decoder = TextDecoder(chars_dict=chars_dict, decode_mode=DecodeMode.CTC) |
| 67 | row = np.array([2, 2, 3, 3, 0, 4], dtype=np.int32) |
| 68 | result = decoder.decode([row]) |
| 69 | assert result == ["ABC"] |
| 70 | |
| 71 | |
| 72 | def test_textdecoder_call(): |
nothing calls this directly
no test coverage detected