A tiled tensor.
if isinstance(n, int):
n = [n]
return tf.tile(x, n)
def flatten(x):
After Change
elif isinstance(n, list):
n = tuple(n)
shape = int_shape(x)
if len(n) < len(shape): // Padding the axis
n = tuple([1 for _ in range(len(shape) - len(n))]) + n
elif len(n) != len(shape):
raise NotImplementedError