def __init__(self, in_channels, in_size=4, B=100, C=5, gap=True, dr=None):
    super(SNMDBlock, self).__init__()
    initializer = chainer.initializers.GlorotUniform()
    self.B = B
    self.C = C
    self.dr = dr
    self.gap = gap
    if gap:
        in_size = 1
    if (type(in_size) is int):
        in_size = (in_size, in_size)
    with self.init_scope():
        self.l = SNLinear((((in_size[0] * in_size[1]) * in_channels) + B), 1, initialW=initializer)
        self.md = SNLinear(((in_size[0] * in_size[1]) * in_channels), (B * C), initialW=initializer)
def __init__(self, in_channels, in_size=4, B=100, C=5, gap=True, dr=None):
    super(SNMDBlock, self).__init__()
    initializer = chainer.initializers.GlorotUniform()
    self.B = B
    self.C = C
    self.dr = dr
    self.gap = gap
    if gap:
        in_size = 1
    if (type(in_size) is int):
        in_size = (in_size, in_size)
    with self.init_scope():
        self.l = SNLinear((((in_size[0] * in_size[1]) * in_channels) + B), 1, initialW=initializer)
        self.md = SNLinear(((in_size[0] * in_size[1]) * in_channels), (B * C), initialW=initializer)