def __init__(self, in_channels, out_channels, activation=F.leaky_relu, bn=True):
    super(CoPSBlock, self).__init__()
    initializer = chainer.initializers.GlorotUniform()
    self.activation = activation
    self.bn = bn
    with self.init_scope():
        self.ps = L.Convolution2D(in_channels, (in_channels * 4), ksize=1, stride=1, initialW=initializer)
        self.c = L.Convolution2D(in_channels, out_channels, ksize=3, stride=1, pad=1, initialW=initializer)
        if bn:
            self.b = L.BatchNormalization(out_channels)
def __init__(self, in_channels, out_channels, activation=F.leaky_relu, bn=True):
    super(CoPSBlock, self).__init__()
    initializer = chainer.initializers.GlorotUniform()
    self.activation = activation
    self.bn = bn
    with self.init_scope():
        self.ps = L.Convolution2D(in_channels, (in_channels * 4), ksize=1, stride=1, initialW=initializer)
        self.c = L.Convolution2D(in_channels, out_channels, ksize=3, stride=1, pad=1, initialW=initializer)
        if bn:
            self.b = L.BatchNormalization(out_channels)