Skip to content

Commit 1b91953

Browse files
Add example for ComplexNorm (#1658)
1 parent 2e58f18 commit 1b91953

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

torchaudio/transforms.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,11 @@ class ComplexNorm(torch.nn.Module):
780780
781781
Args:
782782
power (float, optional): Power of the norm. (Default: to ``1.0``)
783+
784+
Example
785+
>>> complex_tensor = ... # Tensor shape of (…, complex=2)
786+
>>> transform = transforms.ComplexNorm(power=2)
787+
>>> complex_norm = transform(complex_tensor)
783788
"""
784789
__constants__ = ['power']
785790

0 commit comments

Comments
 (0)