import tensorflow as tf

        l = layer

        if use_bn:
            l = batch_norm_conv(l, b_train=bn_phaze, scope='bn')

        l = act_func(l)
        l = conv(l, scope='conv', filter_dims=filter_dims, stride_dims=[1, 1], dilation=dilation,
                 non_linear_fn=None, bias=use_bias)
        l = tf.concat([l, layer], 3)

    return l


def add_residual_layer(layer, filter_dims, act_func=tf.nn.relu, scope='residual_layer',
                       use_bn=True, bn_phaze=False, use_bias=False, dilation=[1, 1, 1, 1]):
    with tf.variable_scope(scope):
