Skip to content

Commit

Permalink
Merge pull request TensorSpeech#113 from TensorSpeech/fix/beamsearch
Browse files Browse the repository at this point in the history
Fix padding in transducer batch beam search
  • Loading branch information
nglehuy authored Jan 14, 2021
2 parents 8b9383c + c4ab7dc commit f23235e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tensorflow_asr/models/transducer.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ def body(batch, decoded):
)
prediction = tf.pad(
hypothesis.prediction,
paddings=[[0, total_time - encoded_length[batch]]],
paddings=[[0, 2 * (total_time - encoded_length[batch])]],
mode="CONSTANT", constant_values=self.text_featurizer.blank
)
decoded = decoded.write(batch, prediction)
Expand Down

0 comments on commit f23235e

Please sign in to comment.