Exemplo n.º 1
0
 def __init__(self,
              num_classes=1000,
              width_mult=1.0,
              kw=4,
              ka=4,
              fp_layers=None,
              align_zero=True,
              use_channel_quant=False,
              use_ckpt=False,
              use_multi_domain=False):
     MobileNetV2.__init__(self, num_classes, width_mult)
     IDQ.__init__(self, MobileNetV2.forward, kw, ka, fp_layers, align_zero,
                  use_channel_quant, use_ckpt, use_multi_domain)
Exemplo n.º 2
0
 def __init__(
     self,
     output_dims: List[int],
     blocks: int = 4,
     pretrained_settings: Optional[Dict[str,
                                        Union[str, int, float,
                                              List[Union[int,
                                                         float]]]]] = None,
     pretrained: bool = False,
     progress: bool = False,
     # width_mult: float = 1.0,
     # inverted_residual_setting: Optional[List[List[int]]] = None,
     # round_nearest: int = 8,
     # block: Optional[nn.Module] = None
 ):
     MobileNetV2.__init__(self)
     Encoder.__init__(self, output_dims, pretrained_settings, pretrained,
                      progress)
     # MobileNetV2.__init__(width_mult=width_mult, inverted_residual_setting=inverted_residual_setting,
     # round_nearest=round_nearest, block=block)
     self.blocks = blocks