| 15 | ########################### |
| 16 | |
| 17 | class 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 |
nothing calls this directly
no outgoing calls
no test coverage detected