mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-09-04 06:34:20 +00:00
check codebook index range before saving
This commit is contained in:
parent
76e56fa28f
commit
c026a97d41
@ -92,9 +92,7 @@ def compute_codeindices(
|
||||
|
||||
# [N, T, C]
|
||||
codebook_indices = codebook_indices.to("cpu").numpy()
|
||||
assert np.all(
|
||||
codebook_indices[np.where(codebook_indices < 0)] == -100
|
||||
)
|
||||
assert np.min(codebook_indices) >= 0
|
||||
assert np.max(codebook_indices) < 256
|
||||
|
||||
supervisions = batch["supervisions"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user