import tensorflow as tf

                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

