Split

Split - 18

版本

  • 名称: Split (GitHub)

  • : main

  • 起始版本: 18

  • 函数: False

  • 支持级别: SupportType.COMMON

  • 形状推断: True

此版本的操作符自版本 18 起可用

摘要

沿指定的“轴”将张量拆分为张量列表。必须指定输入“split”或属性“num_outputs”,但不能同时指定两者。如果指定了属性“num_outputs”,则张量将被拆分为大小相等的块。如果张量无法均匀地拆分为 num_outputs 块,则最后一个块将较小。如果指定了输入“split”,它表示拆分中每个输出的大小。

属性

  • axis - INT (默认值为 '0')

    要拆分的轴。负值表示从后向前计算维度。接受范围是 [-rank, rank-1],其中 r = rank(input)。

  • num_outputs - INT :

    将张量拆分为的输出部分数量。如果张量不能均匀拆分,则最后一个块将较小。

输入

1 到 2 个输入之间。

  • 输入 (异构) - T

    要拆分的张量

  • split (可选,异构) - tensor(int64)

    每个输出的可选长度。值应 >= 0。所有值的总和必须等于指定“轴”处的维度值。

输出

1 到 2147483647 个输出之间。

  • outputs (可变,异构) - T

    拆分后形成张量列表的一个或多个输出

类型约束

  • 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) )

    将输入和输出类型限制为所有张量类型。

Split - 13

版本

  • 名称: Split (GitHub)

  • : main

  • 起始版本: 13

  • 函数: False

  • 支持级别: SupportType.COMMON

  • 形状推断: True

此版本的运算符自 版本 13 起可用。

摘要

沿指定的“轴”将张量拆分为张量列表。部分长度可以使用输入“split”指定。否则,张量将拆分为大小相等的块。

属性

  • axis - INT (默认值为 '0')

    要拆分的轴。负值表示从后向前计算维度。接受范围是 [-rank, rank-1],其中 r = rank(input)。

输入

1 到 2 个输入之间。

  • 输入 (异构) - T

    要拆分的张量

  • split (可选,异构) - tensor(int64)

    每个输出的可选长度。值应 >= 0。所有值的总和必须等于指定“轴”处的维度值。

输出

1 到 2147483647 个输出之间。

  • outputs (可变,异构) - T

    拆分后形成张量列表的一个或多个输出

类型约束

  • 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) )

    将输入和输出类型限制为所有张量类型。

Split - 11

版本

  • 名称: Split (GitHub)

  • : main

  • 起始版本: 11

  • 函数: False

  • 支持级别: SupportType.COMMON

  • 形状推断: True

此版本的运算符自 版本 11 起可用。

摘要

沿指定的“轴”将张量拆分为张量列表。部分长度可以使用参数“split”指定。否则,张量将拆分为大小相等的块。

属性

  • axis - INT (默认值为 '0')

    要拆分的轴。负值表示从后向前计算维度。接受范围是 [-rank, rank-1],其中 r = rank(input)。

  • split - INTS :

    每个输出的长度。值应 >= 0。

输入

  • 输入 (异构) - T

    要拆分的张量

输出

1 到 2147483647 个输出之间。

  • outputs (可变,异构) - T

    拆分后形成张量列表的一个或多个输出

类型约束

  • 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) )

    将输入和输出类型限制为所有张量类型。

Split - 2

版本

  • 名称: Split (GitHub)

  • : main

  • since_version: 2

  • 函数: False

  • 支持级别: SupportType.COMMON

  • 形状推断: True

此操作符版本自 版本 2 起可用。

摘要

沿指定的“轴”将张量拆分为张量列表。部分长度可以使用参数“split”指定。否则,张量将拆分为大小相等的块。

属性

  • axis - INT (默认值为 '0')

    要拆分的轴。

  • split - INTS :

    每个输出的长度

输入

  • 输入 (异构) - T

    要拆分的张量

输出

1 到 2147483647 个输出之间。

  • outputs (可变,异构) - T

    拆分后形成张量列表的一个或多个输出

类型约束

  • 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) )

    将输入和输出类型限制为所有张量类型。

Split - 1

版本

  • 名称: Split (GitHub)

  • : main

  • 起始版本: 1

  • 函数: False

  • 支持级别: SupportType.COMMON

  • 形状推断: False

此版本的运算符自 版本 1 起可用。

摘要

沿指定的“轴”将张量拆分为张量列表。拆分的长度可以使用参数“axis”或运算符的可选第二个输入 blob 来指定。否则,张量将拆分为大小相等的块。

属性

  • 轴 - INT :

    要拆分的轴

  • split - INTS :

    每个输出的长度

输入

1 到 2 个输入之间。

  • 输入 (异构) - T

    要拆分的张量

  • split (可选,异构) - T

    输出长度的可选列表(另请参阅参数“split”)

输出

1 到 2147483647 个输出之间。

  • outputs… (可变,异构) - T

    拆分后形成张量列表的一个或多个输出

类型约束

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

    将输入类型限制为浮点张量。