mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-09-06 07:34:21 +00:00
Fix finalize error in contextgraph
This commit is contained in:
parent
140e6381ad
commit
e06e128d73
@ -240,8 +240,11 @@ class ContextGraph:
|
|||||||
the score is zero, otherwise the score is the score of a implicit fail arc
|
the score is zero, otherwise the score is the score of a implicit fail arc
|
||||||
to root. The next state is always root.
|
to root. The next state is always root.
|
||||||
"""
|
"""
|
||||||
# The score of the fail arc
|
if state.is_end:
|
||||||
score = -state.node_score
|
score = 0.0
|
||||||
|
else:
|
||||||
|
# The score of the fail arc
|
||||||
|
score = -state.node_score
|
||||||
return (score, self.root)
|
return (score, self.root)
|
||||||
|
|
||||||
def draw(
|
def draw(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user