import tensorflow as tf

    x = tf.split(x, out_channels, 4)
    x = tf.concat([phase_shift_3d(v, r) for v in x], 4)
    return x

def pixel_shuffler_3d(x, r, k, out_channels, name):
    in_channels = x.get_shape.as_list()[4]
    with tf.variable_scope(name):
        u = conv3d(x, [k, k, k, in_channels, out_channels*pow(r, 3)], 'conv', bias=True, stride=1)
        h = subpixel_conv3d(u, r, out_channels)
        return h

def minibatch_discrimination(x, n_kernels, dim_per_kernel, name):
