Unverified Commit 658e3a88 authored by Arijit Roy's avatar Arijit Roy Committed by GitHub
Browse files

Add example code for Resample (#1644)

parent d1d6dbc6
...@@ -643,6 +643,11 @@ class Resample(torch.nn.Module): ...@@ -643,6 +643,11 @@ class Resample(torch.nn.Module):
cached as ``torch.float64``. If you use resample with lower precision, then instead of providing this cached as ``torch.float64``. If you use resample with lower precision, then instead of providing this
providing this argument, please use ``Resample.to(dtype)``, so that the kernel generation is still providing this argument, please use ``Resample.to(dtype)``, so that the kernel generation is still
carried out on ``torch.float64``. carried out on ``torch.float64``.
Example
>>> waveform, sample_rate = torchaudio.load('test.wav', normalize=True)
>>> transform = transforms.Resample(sample_rate, sample_rate/10)
>>> waveform = transform(waveform)
""" """
def __init__( def __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