def __init__(self, backbone: str='ResNet-18', num_classes: int=19) -> None:
    super().__init__()
    (backbone, variant) = backbone.split('-')
    self.context_path = ContextPath(eval(backbone)(variant))
    self.spatial_path = SpatialPath(3, 128)
    self.ffm = FeatureFusionModule(256, 256)
    self.output_head = Head(256, num_classes, upscale_factor=8, is_aux=False)
    self.context16_head = Head(128, num_classes, upscale_factor=8, is_aux=True)
    self.context32_head = Head(128, num_classes, upscale_factor=16, is_aux=True)
    self.apply(self._init_weights)
def __init__(self, backbone: str='ResNet-18', num_classes: int=19) -> None:
    super().__init__()
    (backbone, variant) = backbone.split('-')
    self.context_path = ContextPath(eval(backbone)(variant))
    self.spatial_path = SpatialPath(3, 128)
    self.ffm = FeatureFusionModule(256, 256)
    self.output_head = Head(256, num_classes, upscale_factor=8, is_aux=False)
    self.context16_head = Head(128, num_classes, upscale_factor=8, is_aux=True)
    self.context32_head = Head(128, num_classes, upscale_factor=16, is_aux=True)
    self.apply(self._init_weights)