import torch


def duplicate(x, n):
	"""Duplicate a tensor x n times by concatenation
	
	Arguments:
		x {[torch.Tensor]} -- [the tensor to duplicate]
		n {[int]} -- [number of times to duplicate the tensor]
	
	Returns:
		[torch.Tensor] -- [The tensor containing the duplicated input]
	"""

	y = torch.cat(n*[x], 1)
	
	return y