Update decode_stream.py

This commit is contained in:
Yifan Yang 2023-08-08 22:27:15 +08:00 committed by GitHub
parent 23e2c0fa96
commit 436ae9b4cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,7 +84,7 @@ class DecodeStream(object):
self.hyps = HypothesisList()
self.hyps.add(
Hypothesis(
ys=[params.blank_id] * params.context_size,
ys=[-1] * (params.context_size - 1) + [params.blank_id],
log_prob=torch.zeros(1, dtype=torch.float32, device=device),
)
)