序列连接

ConcatFromSequence - 11

版本

  • 名称: ConcatFromSequence (GitHub)

  • 域名: main

  • since_version: 11

  • 函数: False

  • support_level: SupportType.COMMON

  • 形状推断: True

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

摘要

将一系列张量连接成一个单一的张量。 所有输入张量必须具有相同的形状,除了要连接的轴的维度大小。 默认情况下,‘new_axis’为0,行为类似于numpy.concatenate。 当‘new_axis’为1时,行为类似于numpy.stack。

属性

  • axis - INT(必填):

    在哪个轴上进行连接。接受的范围在[-r, r - 1],其中r是输入张量的秩。当new_axis为1时,接受的范围是[-r - 1, r]

  • new_axis - INT (默认为 '0'):

    是否在新轴上插入和连接,默认值为0表示不插入新轴。

输入

  • input_sequence (异构) - S:

    用于连接的张量序列

输出

  • concat_result (异构) - T:

    连接后的张量

类型约束

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

    将输入类型限制为任何张量类型。

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

    将输出类型限制为任何张量类型。