Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
FAST-RNNT
Commits
2945bd7d
Unverified
Commit
2945bd7d
authored
Jul 19, 2023
by
Daniel Povey
Committed by
GitHub
Jul 19, 2023
Browse files
Merge pull request #26 from yfyeung/patch-1
Update rnnt_loss.py
parents
2c2dc4b9
4bff8cc2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
fast_rnnt/python/fast_rnnt/rnnt_loss.py
fast_rnnt/python/fast_rnnt/rnnt_loss.py
+6
-4
No files found.
fast_rnnt/python/fast_rnnt/rnnt_loss.py
View file @
2945bd7d
...
@@ -770,10 +770,12 @@ def do_rnnt_pruning(
...
@@ -770,10 +770,12 @@ def do_rnnt_pruning(
# (B, T, s_range, C)
# (B, T, s_range, C)
lm_pruning
=
torch
.
gather
(
lm_pruning
=
torch
.
gather
(
lm
.
unsqueeze
(
1
).
expand
((
B
,
T
,
S
+
1
,
C
)),
lm
,
dim
=
2
,
dim
=
1
,
index
=
ranges
.
reshape
((
B
,
T
,
s_range
,
1
)).
expand
((
B
,
T
,
s_range
,
C
)),
index
=
ranges
.
reshape
(
B
,
T
*
s_range
,
1
).
expand
(
)
(
B
,
T
*
s_range
,
C
)
),
).
reshape
(
B
,
T
,
s_range
,
C
)
return
am_pruning
,
lm_pruning
return
am_pruning
,
lm_pruning
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment