-
Notifications
You must be signed in to change notification settings - Fork 732
Closed
Milestone
Description
As planned in #1337, F.complex_norm and T.ComplexNorm are now deprecated, and we can remove them.
Steps
- Remove the implementation
audio/torchaudio/functional/functional.py
Line 719 in 25a8adf
| def complex_norm( |
audio/torchaudio/transforms.py
Line 884 in bf580c7
| class ComplexNorm(torch.nn.Module): |
- Remove test
audio/test/torchaudio_unittest/functional/functional_impl.py
Lines 322 to 330 in 25a8adf
| @parameterized.expand( | |
| list(itertools.product([(1, 2, 1025, 400, 2), (1025, 400, 2)], [1, 2, 0.7])) | |
| ) | |
| def test_complex_norm(self, shape, power): | |
| torch.random.manual_seed(42) | |
| complex_tensor = torch.randn(*shape, dtype=self.dtype, device=self.device) | |
| expected_norm_tensor = complex_tensor.pow(2).sum(-1).pow(power / 2) | |
| norm_tensor = F.complex_norm(complex_tensor, power) | |
| self.assertEqual(norm_tensor, expected_norm_tensor, atol=1e-5, rtol=1e-5) |
| def test_ComplexNorm(self): |
-
Make sure the test passes.
-
Update docs
Note
For setting up the development environment, please refer to CONTRIBUTING.md and torchaudio_unittest