MCPcopy Create free account
hub / github.com/BorealisAI/scaleformer / __init__

Method __init__

layers/MultiWaveletCorrelation.py:42–53  ·  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

40 """
41
42 def __init__(self, ich=1, k=8, alpha=16, c=128,
43 nCZ=1, L=0, base='legendre', attention_dropout=0.1):
44 super(MultiWaveletTransform, self).__init__()
45 print('base', base)
46 self.k = k
47 self.c = c
48 self.L = L
49 self.nCZ = nCZ
50 self.Lk0 = nn.Linear(ich, c * k)
51 self.Lk1 = nn.Linear(c * k, ich)
52 self.ich = ich
53 self.MWT_CZ = nn.ModuleList(MWT_CZ1d(k, alpha, L, c, base) for i in range(nCZ))
54
55 def forward(self, queries, keys, values, attn_mask):
56 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