import tensorflow as tf

    for ns in [d, h, w]:
        x = tf.split(x, ns, 1)
        x = tf.concat([tf.squeeze(v, 1) for v in x], 3)
    return tf.reshape(x, (batch_size, d*r, h*r, w*r, 1))

def subpixel_conv3d(x, r, out_channels):
    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]
