def __init__(self, embedding_size=128, input_size=224, width_mult=1.0):
    super(Net, self).__init__()
    block = InvertedResidual
    block_dwc = InvertedResidual_dwc
    input_channel = 64
    last_channel = 256
    interverted_residual_setting = [[1, 48, 1, 1], [2, 48, 2, 1], [4, 48, 2, 2], [2, 48, 2, 1], [4, 48, 5, 1], [2, 48, 2, 2], [2, 48, 6, 2]]
    input_channel = int((input_channel * width_mult))
    self.last_channel = (int((last_channel * width_mult)) if (width_mult > 1.0) else last_channel)
    self.features = [conv_bn(3, input_channel, 2)]
    cnt = 0
    for (t, c, n, s) in interverted_residual_setting:
        output_channel = int((c * width_mult))
        for i in range(n):
            if (cnt > 1):
                if (i == (n - 1)):
                    self.features.append(block_dwc(input_channel, output_channel, s, expand_ratio=t))
                else:
                    self.features.append(block_dwc(input_channel, output_channel, 1, expand_ratio=t))
                input_channel = output_channel
            else:
                if (i == (n - 1)):
                    self.features.append(block_dwc(input_channel, output_channel, s, expand_ratio=t))
                else:
                    self.features.append(block_dwc(input_channel, output_channel, 1, expand_ratio=t))
                input_channel = output_channel
        cnt += 1
    self.features.append(gated_conv1x1(input_channel, self.last_channel))
    self.features_sequential = nn.Sequential(*self.features)
    self._initialize_weights()
def __init__(self, embedding_size=128, input_size=224, width_mult=1.0):
    super(Net, self).__init__()
    block = InvertedResidual
    block_dwc = InvertedResidual_dwc
    input_channel = 64
    last_channel = 256
    interverted_residual_setting = [[1, 48, 1, 1], [2, 48, 2, 1], [4, 48, 2, 2], [2, 48, 2, 1], [4, 48, 5, 1], [2, 48, 2, 2], [2, 48, 6, 2]]
    input_channel = int((input_channel * width_mult))
    self.last_channel = (int((last_channel * width_mult)) if (width_mult > 1.0) else last_channel)
    self.features = [conv_bn(3, input_channel, 2)]
    cnt = 0
    for (t, c, n, s) in interverted_residual_setting:
        output_channel = int((c * width_mult))
        for i in range(n):
            if (cnt > 1):
                if (i == (n - 1)):
                    self.features.append(block_dwc(input_channel, output_channel, s, expand_ratio=t))
                else:
                    self.features.append(block_dwc(input_channel, output_channel, 1, expand_ratio=t))
                input_channel = output_channel
            else:
                if (i == (n - 1)):
                    self.features.append(block_dwc(input_channel, output_channel, s, expand_ratio=t))
                else:
                    self.features.append(block_dwc(input_channel, output_channel, 1, expand_ratio=t))
                input_channel = output_channel
        cnt += 1
    self.features.append(gated_conv1x1(input_channel, self.last_channel))
    self.features_sequential = nn.Sequential(*self.features)
    self._initialize_weights()