From 7abd266ab21a47d7757385938f5abad993975992 Mon Sep 17 00:00:00 2001 From: shahules786 Date: Mon, 31 Oct 2022 11:43:50 +0530 Subject: [PATCH] test complexnn --- tests/models/complexnn_test.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tests/models/complexnn_test.py b/tests/models/complexnn_test.py index 9ca5811..53ffba2 100644 --- a/tests/models/complexnn_test.py +++ b/tests/models/complexnn_test.py @@ -1,6 +1,6 @@ import torch -from enhancer.models.complexnn.conv import ComplexConv2d +from enhancer.models.complexnn.conv import ComplexConv2d, ComplexConvTranspose2d def test_complexconv2d(): @@ -11,3 +11,19 @@ def test_complexconv2d(): with torch.no_grad(): out = conv(sample_input) assert out.shape == torch.Size([1, 32, 128, 14]) + + +def test_complexconvtranspose2d(): + sample_input = torch.rand(1, 512, 4, 13) + conv = ComplexConvTranspose2d( + 256 * 2, + 128 * 2, + kernel_size=(5, 2), + stride=(2, 1), + padding=(2, 0), + output_padding=(1, 0), + ) + with torch.no_grad(): + out = conv(sample_input) + + assert out.shape == torch.Size([1, 256, 8, 14])