Skip to content

Commit 16acf16

Browse files
committed
Cleanup of 'fft_conv.py' code using Black formatter.
1 parent 6e89a3a commit 16acf16

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

fft_conv.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,19 @@ def __init__(
154154

155155
if in_channels % 2 != 0:
156156
raise ValueError(
157-
f"'in_channels' ({in_channels}) must be divisible by 'groups' ({groups})."
157+
"'in_channels' must be divisible by 'groups'."
158+
f"Found: in_channels={in_channels}, groups={groups}."
158159
)
159160
if out_channels % 2 != 0:
160161
raise ValueError(
161-
f"'out_channels' ({out_channels}) must be divisible by 'groups' ({groups})."
162+
"'out_channels' must be divisible by 'groups'."
163+
f"Found: out_channels={out_channels}, groups={groups}."
162164
)
163165

164166
kernel_size = to_ntuple(kernel_size, ndim)
165-
self.weight = nn.Parameter(torch.randn(out_channels, in_channels // groups, *kernel_size))
167+
self.weight = nn.Parameter(
168+
torch.randn(out_channels, in_channels // groups, *kernel_size)
169+
)
166170
self.bias = nn.Parameter(torch.randn(out_channels,)) if bias else None
167171

168172
def forward(self, signal):

0 commit comments

Comments
 (0)