ConcatFromSequence

ConcatFromSequence - 11

版本

此版本的运算符自 版本 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) ) 中

    将输出类型约束为任何张量类型。