function repeat(x, n) {
	  return tidy(function () {
	    if (x.shape.length !== 2) {
	      throw new ValueError("repeat() expects a rank-2 tensor, but received a " + ("rank-" + x.shape.length + " tensor."));
	    }

	    var y = expandDims$1(x, 1);
	    return tile$1(y, [1, n, 1]);
	  });
	}
Repeats a 2D tensor.

If `x` has shape `[samples, dim]` and `n` is 2, for example, the output
will have shape `[samples, 2, dim]`.

@param x Input tensor.
@param n Integer, number of times to repeat.
@returns The result of the repeat operation.
@throws ValueError: If input tensor is not 2D.