Unverified Commit 17a3bbfe authored by S Harish's avatar S Harish Committed by GitHub
Browse files

Add example for GriffinLim (#1671)

parent 1d6b15ea
...@@ -155,6 +155,12 @@ class GriffinLim(torch.nn.Module): ...@@ -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``) 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``) 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``) 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', __constants__ = ['n_fft', 'n_iter', 'win_length', 'hop_length', 'power',
'length', 'momentum', 'rand_init'] 'length', 'momentum', 'rand_init']
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment