MCPcopy Create free account
hub / github.com/TimSeizinger/Bokehlicious / InvertedConvolution

Class InvertedConvolution

method/nn_util.py:53–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 return x
52
53class InvertedConvolution(nn.Module):
54 def __init__(self, in_channels, out_channels, kernel_size, padding='same', bias=True):
55 super().__init__()
56
57 self.conv1 = nn.Conv2d(in_channels=in_channels, out_channels=out_channels,
58 kernel_size=1, padding=0, stride=1, groups=1, bias=bias)
59
60 self.conv2 = nn.Conv2d(in_channels=out_channels, out_channels=out_channels, kernel_size=kernel_size,
61 padding=padding, stride=1, groups=out_channels, bias=bias)
62
63 def forward(self, x):
64 x = self.conv1(x)
65 x = self.conv2(x)
66 return x
67
68class DWConv2d(nn.Module):
69

Callers 1

__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected