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
17a3bbfe
"fair_dev/vscode:/vscode.git/clone" did not exist on "4c830de1846af60840c6630b08c8f8079525f116"
Unverified
Commit
17a3bbfe
authored
Aug 04, 2021
by
S Harish
Committed by
GitHub
Aug 04, 2021
Browse files
Add example for GriffinLim (#1671)
parent
1d6b15ea
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
torchaudio/transforms.py
torchaudio/transforms.py
+6
-0
No files found.
torchaudio/transforms.py
View file @
17a3bbfe
...
...
@@ -155,6 +155,12 @@ class GriffinLim(torch.nn.Module):
Values near 1 can lead to faster convergence, but above 1 may not converge. (Default: ``0.99``)
length (int, optional): Array length of the expected output. (Default: ``None``)
rand_init (bool, optional): Initializes phase randomly if True and to zero otherwise. (Default: ``True``)
Example
>>> batch, freq, time = 2, 257, 100
>>> spectrogram = torch.randn(batch, freq, time)
>>> transform = transforms.GriffinLim(n_fft=512)
>>> waveform = transform(spectrogram)
"""
__constants__
=
[
'n_fft'
,
'n_iter'
,
'win_length'
,
'hop_length'
,
'power'
,
'length'
,
'momentum'
,
'rand_init'
]
...
...
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