MCPcopy Create free account
hub / github.com/dangf15/THLNet / __init__

Method __init__

complexnn.py:151–185  ·  view source on GitHub ↗

in_channels: real+imag out_channels: real+imag

(
                    self,
                    in_channels,
                    out_channels,
                    kernel_size=(1,1),
                    stride=(1,1),
                    padding=(0,0),
                    output_padding=(0,0),
                    causal=False,
                    complex_axis=1,
                    groups=1,
                    dilation=1,
                )

Source from the content-addressed store, hash-verified

149class ComplexConvTranspose2d(nn.Module):
150
151 def __init__(
152 self,
153 in_channels,
154 out_channels,
155 kernel_size=(1,1),
156 stride=(1,1),
157 padding=(0,0),
158 output_padding=(0,0),
159 causal=False,
160 complex_axis=1,
161 groups=1,
162 dilation=1,
163 ):
164 '''
165 in_channels: real+imag
166 out_channels: real+imag
167 '''
168 super(ComplexConvTranspose2d, self).__init__()
169 self.in_channels = in_channels//2
170 self.out_channels = out_channels//2
171 self.kernel_size = kernel_size
172 self.stride = stride
173 self.padding = padding
174 self.output_padding=output_padding
175 self.groups = groups
176 self.dilation = dilation
177
178 self.real_conv = nn.ConvTranspose2d(self.in_channels, self.out_channels,kernel_size, self.stride,padding=self.padding,output_padding=output_padding, dilation=self.dilation,groups=self.groups)
179 self.imag_conv = nn.ConvTranspose2d(self.in_channels, self.out_channels,kernel_size, self.stride,padding=self.padding,output_padding=output_padding, dilation=self.dilation,groups=self.groups)
180 self.complex_axis=complex_axis
181
182 nn.init.normal_(self.real_conv.weight,std=0.05)
183 nn.init.normal_(self.imag_conv.weight,std=0.05)
184 nn.init.constant_(self.real_conv.bias,0.)
185 nn.init.constant_(self.imag_conv.bias,0.)
186
187 def forward(self,inputs):
188

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected