(self, conf)
| 8 | |
| 9 | class DecoderBase(ABC, nn.Module): |
| 10 | def __init__(self, conf): |
| 11 | super().__init__() |
| 12 | self.conf = conf |
| 13 | |
| 14 | hadarard_op = lambda lst: reduce(lambda x, y: x * y, lst) |
| 15 | summation_op = lambda lst: sum(lst) |
| 16 | self.op = hadarard_op if conf.model.hadamard else summation_op |
| 17 | |
| 18 | self.conv_block = HexplaneConvBlock(conf.model.latent_channels, conf.model.query_channels) |
| 19 | self.hex_upsample_block = None # subclass |
| 20 | |
| 21 | def forward(self, hexplane): |
| 22 | hexplane = self.conv_block(hexplane) # increase number of channels |
no test coverage detected