change tail padding length from right_context_length to chunk_length

This commit is contained in:
yaozengwei 2022-06-17 18:54:55 +08:00
parent 193b44ed7a
commit 5d877ef25e

View File

@ -277,10 +277,10 @@ def decode_one_batch(
supervisions = batch["supervisions"] supervisions = batch["supervisions"]
feature_lens = supervisions["num_frames"].to(device) feature_lens = supervisions["num_frames"].to(device)
feature_lens += params.right_context_length feature_lens += params.chunk_length
feature = torch.nn.functional.pad( feature = torch.nn.functional.pad(
feature, feature,
pad=(0, 0, 0, params.right_context_length), pad=(0, 0, 0, params.chunk_length),
value=LOG_EPS, value=LOG_EPS,
) )