MCPcopy Create free account
hub / github.com/MaureenZOU/TSAM / BaseModule

Class BaseModule

src/model/modules.py:17–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15###########################
16
17class BaseModule(nn.Module):
18 def __init__(self, conv_type, dconv_type=None):
19 super().__init__()
20 self.conv_type = conv_type
21 if dconv_type == None:
22 dconv_type = conv_type
23
24 if conv_type == 'gated':
25 self.ConvBlock = GatedConv
26 elif conv_type == 'partial':
27 self.ConvBlock = PartialConv
28 elif conv_type == 'vanilla':
29 self.ConvBlock = VanillaConv
30
31 if dconv_type == 'gated':
32 self.DeconvBlock = GatedDeconv
33 elif dconv_type == 'partial':
34 self.DeconvBlock = PartialDeconv
35 elif dconv_type == 'vanilla':
36 self.DeconvBlock = VanillaDeconv
37
38
39

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected