MCPcopy Create free account
hub / github.com/Anoise/WTFlib / __init__

Method __init__

LDPS_Graph/layers/MultiWaveletCorrelation.py:262–273  ·  view source on GitHub ↗
(self,
                 k, alpha, c=1,
                 nl=1,
                 initializer=None,
                 **kwargs)

Source from the content-addressed store, hash-verified

260
261class sparseKernelFT1d(nn.Module):
262 def __init__(self,
263 k, alpha, c=1,
264 nl=1,
265 initializer=None,
266 **kwargs):
267 super(sparseKernelFT1d, self).__init__()
268
269 self.modes1 = alpha
270 self.scale = (1 / (c * k * c * k))
271 self.weights1 = nn.Parameter(self.scale * torch.rand(c * k, c * k, self.modes1, dtype=torch.cfloat))
272 self.weights1.requires_grad = True
273 self.k = k
274
275 def compl_mul1d(self, x, weights):
276 # (batch, in_channel, x ), (in_channel, out_channel, x) -> (batch, out_channel, x)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected