• Construct a tensor by repeating it the number of times given by reps.

    This operation creates a new tensor by replicating input reps times. The output tensor's ith dimension has input.shape[i] * reps[i] elements, and the values of input are replicated reps[i] times along the ith dimension. For example, tiling [a, b, c, d] by [2] produces [a, b, c, d, a, b, c, d].

    const a = tf.tensor1d([1, 2]);

    a.tile([2]).print(); // or tf.tile(a, [2])
    const a = tf.tensor2d([1, 2, 3, 4], [2, 2]);

    a.tile([1, 2]).print(); // or tf.tile(a, [1,2])

    Type Parameters

    Parameters

    • x: TensorLike | T

      The tensor to tile.

    • reps: number[]

      Determines the number of replications per dimension.

    Returns T

    Doc