Skip to content

Commit 0b952b4

Browse files
authored
Merge pull request #7 from ThomasDelteil/patch-1
allow beamWidth as argument
2 parents bdd9ab0 + 0f54f16 commit 0b952b4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/BeamSearch.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,11 @@ def addBeam(beamState, labeling):
4949
beamState.entries[labeling] = BeamEntry()
5050

5151

52-
def ctcBeamSearch(mat, classes, lm):
52+
def ctcBeamSearch(mat, classes, lm, beamWidth=25):
5353
"beam search as described by the paper of Hwang et al. and the paper of Graves et al."
5454

5555
blankIdx = len(classes)
5656
maxT, maxC = mat.shape
57-
beamWidth = 25
5857

5958
# initialise beam state
6059
last = BeamState()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy