def concat_cond(x, with_conditioning):
    noise = []
    if add_noise:
        feature_shape = x.shape.as_list()[0:(- 1)]
        noise_shape = (feature_shape + [add_noise])
        noise = [tf.random_normal(noise_shape, 0.0, 0.1)]
    if (with_conditioning and (conditioning is not None)):
        with tf.name_scope('concat_conditioning'):
            spatial_shape = x.shape.as_list()[1:(- 1)]
            resized_cond = resize_func(conditioning, spatial_shape)
            return tf.concat(([x, resized_cond] + noise), axis=(- 1))
    return x
def concat_cond(x, with_conditioning):
    noise = []
    if add_noise:
        feature_shape = x.shape.as_list()[0:(- 1)]
        noise_shape = (feature_shape + [add_noise])
        noise = [tf.random_normal(noise_shape, 0.0, 0.1)]
    if (with_conditioning and (conditioning is not None)):
        with tf.name_scope('concat_conditioning'):
            spatial_shape = x.shape.as_list()[1:(- 1)]
            resized_cond = resize_func(conditioning, spatial_shape)
            return tf.concat(([x, resized_cond] + noise), axis=(- 1))
    return x