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
Torchaudio
Commits
560c082e
Unverified
Commit
560c082e
authored
Aug 26, 2021
by
moto
Committed by
GitHub
Aug 26, 2021
Browse files
[Fbsync] Lint fix (#1726)
parent
4915524f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
examples/pipeline_tacotron2/README.md
examples/pipeline_tacotron2/README.md
+1
-1
test/torchaudio_unittest/common_utils/rnnt_utils.py
test/torchaudio_unittest/common_utils/rnnt_utils.py
+7
-4
No files found.
examples/pipeline_tacotron2/README.md
View file @
560c082e
...
...
@@ -253,4 +253,4 @@ python inference.py --checkpoint-path ${model_path} \
--input-text
"Hello world!"
\
--text-preprocessor
english_characters
\
--output-path
"./outputs.wav"
```
\ No newline at end of file
```
test/torchaudio_unittest/common_utils/rnnt_utils.py
View file @
560c082e
...
...
@@ -5,6 +5,9 @@ import numpy as np
from
torchaudio.functional
import
rnnt_loss
CPU_DEVICE
=
torch
.
device
(
"cpu"
)
class
_NumpyTransducer
(
torch
.
autograd
.
Function
):
@
staticmethod
def
forward
(
...
...
@@ -240,7 +243,7 @@ def get_basic_data(device):
def
get_B1_T10_U3_D4_data
(
random
=
False
,
dtype
=
torch
.
float32
,
device
=
torch
.
device
(
"cpu"
)
,
device
=
CPU_DEVICE
,
):
B
,
T
,
U
,
D
=
2
,
10
,
3
,
4
...
...
@@ -263,7 +266,7 @@ def get_B1_T10_U3_D4_data(
return
data
def
get_B1_T2_U3_D5_data
(
dtype
=
torch
.
float32
,
device
=
torch
.
device
(
"cpu"
)
):
def
get_B1_T2_U3_D5_data
(
dtype
=
torch
.
float32
,
device
=
CPU_DEVICE
):
logits
=
torch
.
tensor
(
[
0.1
,
...
...
@@ -360,7 +363,7 @@ def get_B1_T2_U3_D5_data(dtype=torch.float32, device=torch.device("cpu")):
return
data
,
ref_costs
,
ref_gradients
def
get_B2_T4_U3_D3_data
(
dtype
=
torch
.
float32
,
device
=
torch
.
device
(
"cpu"
)
):
def
get_B2_T4_U3_D3_data
(
dtype
=
torch
.
float32
,
device
=
CPU_DEVICE
):
# Test from D21322854
logits
=
torch
.
tensor
(
[
...
...
@@ -550,7 +553,7 @@ def get_random_data(
max_D
=
40
,
blank
=-
1
,
dtype
=
torch
.
float32
,
device
=
torch
.
device
(
"cpu"
)
,
device
=
CPU_DEVICE
,
seed
=
None
,
):
if
seed
is
not
None
:
...
...
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