import tensorflow as tf

                    if norm:
                        d = tf.contrib.layers.batch_norm(d)
                    d = lrelu(d,alpha=0.2)
                    return d
    
            #def common_deconv2d(layer_input,skip_input, filters,f_size=4,stride=2,dropout_rate=0,name='common_deconv2d'):
            def common_deconv2d(layer_input,filters,f_size=4,stride=2,padding='SAME',dropout_rate=0,name='common_deconv2d'):
                """Layers used during upsampling"""
                with tf.variable_scope(name):
                    if reuse:
                        tf.get_variable_scope().reuse_variables()
                    else:
                        assert tf.get_variable_scope().reuse is False


                    u = tf.contrib.layers.conv2d_transpose(layer_input,filters,f_size,stride=stride,padding=padding)
                    
                    if dropout_rate:
                        u = tf.contrib.layers.dropout(u,keep_prob=dropout_rate)
                    u = tf.contrib.layers.batch_norm(u)
                    u = tf.nn.relu(u)
                   # u = tf.contrib.keras.layers.concatenate([skip_input,u])
                    return u 
            
