Tile

Tile - 13

版本

  • 名称: Tile (GitHub)

  • : main

  • since_version: 13

  • function: False

  • support_level: SupportType.COMMON

  • 形状推断: True

此版本的算子自版本 13 起可用。

摘要

通过平铺给定张量来构造一个张量。这与 Numpy 中的 tile 函数相同,但没有广播。例如,A = [[1, 2], [3, 4]],B = [1, 2],则 tile(A, B) = [[1, 2, 1, 2], [3, 4, 3, 4]]

输入

  • input (异构) - T

    任意形状的输入张量。

  • repeats (异构) - T1

    一个 1D int64 张量,长度与输入张量的维度数相同,包含沿输入张量各维度重复的次数。

输出

  • output (异构) - T

    与输入张量具有相同维度和类型的输出张量。output_dim[i] = input_dim[i] * repeats[i]

类型约束

  • T 在 ( tensor(bfloat16), tensor(bool), tensor(complex128), tensor(complex64), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8) )

    将输入和输出类型约束为所有张量类型。

  • T1 在 ( tensor(int64) )

    将 repeat 的类型约束为 int64 张量。

Tile - 6

版本

  • 名称: Tile (GitHub)

  • : main

  • since_version: 6

  • function: False

  • support_level: SupportType.COMMON

  • 形状推断: True

此版本的算子自版本 6 起可用。

摘要

通过平铺给定张量来构造一个张量。这与 Numpy 中的 tile 函数相同,但没有广播。例如,A = [[1, 2], [3, 4]],B = [1, 2],则 tile(A, B) = [[1, 2, 1, 2], [3, 4, 3, 4]]

输入

  • input (异构) - T

    任意形状的输入张量。

  • repeats (异构) - T1

    一个 1D int64 张量,长度与输入张量的维度数相同,包含沿输入张量各维度重复的次数。

输出

  • output (异构) - T

    与输入张量具有相同维度和类型的输出张量。output_dim[i] = input_dim[i] * repeats[i]

类型约束

  • T 在 ( tensor(bool), tensor(complex128), tensor(complex64), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8) )

    将输入和输出类型约束为所有张量类型。

  • T1 在 ( tensor(int64) )

    将 repeat 的类型约束为 int64 张量。

Tile - 1

版本

  • 名称: Tile (GitHub)

  • : main

  • since_version: 1

  • function: False

  • support_level: SupportType.COMMON

  • 形状推断: True

此版本的算子自版本 1 起可用。

摘要

沿一个轴重复张量的元素。

输入

  • input (异构) - T

    任意形状的输入张量。

  • tiles (异构) - T

    输入张量重复的次数。

  • axis (异构) - T

    进行重复操作的轴。

输出

  • output (异构) - T

    与输入张量形状和类型相同的输出张量。

类型约束

  • T 在 ( tensor(double), tensor(float), tensor(float16) )

    将输入类型约束为浮点张量。

  • T1 在 ( tensor(int64) )

    将 tiles 和 axis 的类型约束为 int64 张量。