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
8a6c12ff
Commit
8a6c12ff
authored
Mar 15, 2022
by
pkufool
Browse files
Minor fixes
parent
90edd9ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
27 deletions
+27
-27
README.md
README.md
+27
-27
No files found.
README.md
View file @
8a6c12ff
...
...
@@ -99,12 +99,12 @@ boundary[:, 2] = target_lengths
boundary
[:,
3
]
=
num_frames
loss
=
fast_rnnt
.
rnnt_loss_simple
(
lm
=
lm
,
am
=
am
,
symbols
=
symbols
,
termination_symbol
=
termination_symbol
,
boundary
=
boundary
,
reduction
=
"sum"
,
lm
=
lm
,
am
=
am
,
symbols
=
symbols
,
termination_symbol
=
termination_symbol
,
boundary
=
boundary
,
reduction
=
"sum"
,
)
```
...
...
@@ -129,15 +129,15 @@ boundary = torch.zeros((B, 4), dtype=torch.int64)
boundary
[:,
2
]
=
target_lengths
boundary
[:,
3
]
=
num_frames
loss
=
fast_rnnt
.
rnnt_loss_s
imple
(
lm
=
lm
,
am
=
am
,
symbols
=
symbols
,
termination_symbol
=
termination_symbol
,
lm_only_scale
=
0.25
,
am_only_scale
=
0.0
boundary
=
boundary
,
reduction
=
"sum"
,
loss
=
fast_rnnt
.
rnnt_loss_s
moothed
(
lm
=
lm
,
am
=
am
,
symbols
=
symbols
,
termination_symbol
=
termination_symbol
,
lm_only_scale
=
0.25
,
am_only_scale
=
0.0
boundary
=
boundary
,
reduction
=
"sum"
,
)
```
...
...
@@ -157,13 +157,13 @@ boundary[:, 3] = num_frames
# rnnt_loss_simple can be also rnnt_loss_smoothed
simple_loss
,
(
px_grad
,
py_grad
)
=
fast_rnnt
.
rnnt_loss_simple
(
lm
=
lm
,
am
=
am
,
symbols
=
symbols
,
termination_symbol
=
termination_symbol
,
boundary
=
boundary
,
reduction
=
"sum"
,
return_grad
=
True
,
lm
=
lm
,
am
=
am
,
symbols
=
symbols
,
termination_symbol
=
termination_symbol
,
boundary
=
boundary
,
reduction
=
"sum"
,
return_grad
=
True
,
)
s_range
=
5
# can be other values
ranges
=
fast_rnnt
.
get_rnnt_prune_ranges
(
...
...
@@ -203,11 +203,11 @@ boundary[:, 2] = target_lengths
boundary
[:,
3
]
=
num_frames
loss
=
fast_rnnt
.
rnnt_loss
(
logits
=
logits
,
symbols
=
symbols
,
termination_symbol
=
termination_symbol
,
boundary
=
boundary
,
reduction
=
"sum"
,
logits
=
logits
,
symbols
=
symbols
,
termination_symbol
=
termination_symbol
,
boundary
=
boundary
,
reduction
=
"sum"
,
)
```
...
...
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