import tensorflow as tf

                else:
                    init = tf.truncated_normal_initializer(stddev=init_stddev)
                X = tf.layers.conv2d(X, out_channels, kernel_size=filtersize, strides=(stride, stride), padding="valid",
                                    kernel_initializer=init)
                if norm == 'I':
                    X = tf.contrib.layers.instance_norm(X, scope=scope, reuse=reuse, epsilon=0.001)
                elif norm == 'B':
                    X = tf.layers.batch_normalization(X, reuse=reuse, training=True)
                elif norm == 'G':
                    X = tf.contrib.layers.group_norm(X, groups=16, scope=scope, reuse=reuse)
                if nonlin:
                    X = tf.nn.leaky_relu(X, 0.2)
                return X

        with tf.variable_scope('discriminator') as scope:
            if reuse:
                scope.reuse_variables()

            print('D in:', X.get_shape().as_list())

            X = self.conv('DZ1', X, 512, 1, 1)
            X = tf.nn.leaky_relu(X, 0.2)
