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

Method __init__

LDPS_Graph/layers/MultiWaveletCorrelation.py:25–36  ·  view source on GitHub ↗
(self, ich=1, k=8, alpha=16, c=128,
                 nCZ=1, L=0, base='legendre', attention_dropout=0.1)

Source from the content-addressed store, hash-verified

23 1D multiwavelet block.
24 """
25 def __init__(self, ich=1, k=8, alpha=16, c=128,
26 nCZ=1, L=0, base='legendre', attention_dropout=0.1):
27 super(MultiWaveletTransform, self).__init__()
28 print('base', base)
29 self.k = k
30 self.c = c
31 self.L = L
32 self.nCZ = nCZ
33 self.Lk0 = nn.Linear(ich, c * k)
34 self.Lk1 = nn.Linear(c * k, ich)
35 self.ich = ich
36 self.MWT_CZ = nn.ModuleList(MWT_CZ1d(k, alpha, L, c, base) for i in range(nCZ))
37
38 def forward(self, queries, keys, values, attn_mask):
39 B, L, H, E = queries.shape

Callers

nothing calls this directly

Calls 2

MWT_CZ1dClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected