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
hehl2
Torchaudio
Commits
af652ca6
"git@developer.sourcefind.cn:OpenDAS/mmdetection3d.git" did not exist on "7fec1d533bacf5b5c89d456f65c775c3cc458c72"
Unverified
Commit
af652ca6
authored
Aug 03, 2021
by
Caroline Chen
Committed by
GitHub
Aug 03, 2021
Browse files
Improve RNNT Loss docstrings (#1620)
parent
d74d0604
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
torchaudio/prototype/rnnt_loss.py
torchaudio/prototype/rnnt_loss.py
+8
-6
No files found.
torchaudio/prototype/rnnt_loss.py
View file @
af652ca6
...
@@ -24,12 +24,13 @@ def rnnt_loss(
...
@@ -24,12 +24,13 @@ def rnnt_loss(
dependencies.
dependencies.
Args:
Args:
logits (Tensor): Tensor of dimension (batch, time, target, class) containing output from joiner
logits (Tensor): Tensor of dimension (batch, max seq length, max target length + 1, class)
containing output from joiner
targets (Tensor): Tensor of dimension (batch, max target length) containing targets with zero padded
targets (Tensor): Tensor of dimension (batch, max target length) containing targets with zero padded
logit_lengths (Tensor): Tensor of dimension (batch) containing lengths of each sequence from encoder
logit_lengths (Tensor): Tensor of dimension (batch) containing lengths of each sequence from encoder
target_lengths (Tensor): Tensor of dimension (batch) containing lengths of targets for each sequence
target_lengths (Tensor): Tensor of dimension (batch) containing lengths of targets for each sequence
blank (int, opt): blank label (Default: ``-1``)
blank (int, opt
ional
): blank label (Default: ``-1``)
clamp (float): clamp for gradients (Default: ``-1``)
clamp (float
, optional
): clamp for gradients (Default: ``-1``)
reduction (string, optional): Specifies the reduction to apply to the output:
reduction (string, optional): Specifies the reduction to apply to the output:
``'none'`` | ``'mean'`` | ``'sum'``. (Default: ``'mean'``)
``'none'`` | ``'mean'`` | ``'sum'``. (Default: ``'mean'``)
...
@@ -69,8 +70,8 @@ class RNNTLoss(torch.nn.Module):
...
@@ -69,8 +70,8 @@ class RNNTLoss(torch.nn.Module):
dependencies.
dependencies.
Args:
Args:
blank (int, opt): blank label (Default: ``-1``)
blank (int, opt
ional
): blank label (Default: ``-1``)
clamp (float): clamp for gradients (Default: ``-1``)
clamp (float
, optional
): clamp for gradients (Default: ``-1``)
reduction (string, optional): Specifies the reduction to apply to the output:
reduction (string, optional): Specifies the reduction to apply to the output:
``'none'`` | ``'mean'`` | ``'sum'``. (Default: ``'mean'``)
``'none'`` | ``'mean'`` | ``'sum'``. (Default: ``'mean'``)
"""
"""
...
@@ -95,7 +96,8 @@ class RNNTLoss(torch.nn.Module):
...
@@ -95,7 +96,8 @@ class RNNTLoss(torch.nn.Module):
):
):
"""
"""
Args:
Args:
logits (Tensor): Tensor of dimension (batch, time, target, class) containing output from joiner
logits (Tensor): Tensor of dimension (batch, max seq length, max target length + 1, class)
containing output from joiner
targets (Tensor): Tensor of dimension (batch, max target length) containing targets with zero padded
targets (Tensor): Tensor of dimension (batch, max target length) containing targets with zero padded
logit_lengths (Tensor): Tensor of dimension (batch) containing lengths of each sequence from encoder
logit_lengths (Tensor): Tensor of dimension (batch) containing lengths of each sequence from encoder
target_lengths (Tensor): Tensor of dimension (batch) containing lengths of targets for each sequence
target_lengths (Tensor): Tensor of dimension (batch) containing lengths of targets for each sequence
...
...
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