mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-09-07 08:04:18 +00:00
add --blank-bias in decoding.py
This commit is contained in:
parent
b8aad7b9f2
commit
07bd9f3e0e
@ -68,7 +68,14 @@ def get_parser():
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--otc-token", type=str, default="<star>", help="OTC token",
|
||||
"--otc-token", type=str, default="▁<star>", help="OTC token",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--blank-bias",
|
||||
type=float,
|
||||
default=0,
|
||||
help="bias (log-prob) added to blank token during decoding",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
@ -384,6 +391,7 @@ def decode_one_batch(
|
||||
|
||||
nnet_output, memory, memory_key_padding_mask = model(feature, supervisions)
|
||||
# nnet_output is (N, T, C)
|
||||
nnet_output[:, :, 0] += params.blank_bias
|
||||
|
||||
supervision_segments = torch.stack(
|
||||
(
|
||||
|
Loading…
x
Reference in New Issue
Block a user