(self, layers, *args, super_resolution = False, num_prototypes = 1, **kwargs)
| 5 | |
| 6 | class Decoder(nn.Module): |
| 7 | def __init__(self, layers, *args, super_resolution = False, num_prototypes = 1, **kwargs) -> None: |
| 8 | super().__init__(*args, **kwargs) |
| 9 | self.layers = layers |
| 10 | self.scales = self.layers.keys() |
| 11 | self.super_resolution = super_resolution |
| 12 | self.num_prototypes = num_prototypes |
| 13 | def forward(self, features, context = None, scale = None): |
| 14 | if context is not None: |
| 15 | features = torch.cat((features, context), dim = 1) |