SequenceInsert

SequenceInsert - 11

版本

  • 名称: SequenceInsert (GitHub)

  • : main

  • 起始版本: 11

  • 函数: False

  • 支持级别: SupportType.COMMON

  • 形状推断: True

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

摘要

输出一个张量序列,该序列将 'tensor' 插入到 'input_sequence' 的 'position' 处。'tensor' 必须具有与 'input_sequence' 相同的数据类型。'position' 的接受范围是 [-n, n],其中 n 是 'input_sequence' 中的张量数量。负值表示从末尾开始计数。'position' 是可选的,默认情况下它将 'tensor' 插入到 'input_sequence' 的末尾。

输入

输入数量在 2 到 3 之间。

  • input_sequence (heterogeneous) - S

    输入序列。

  • tensor (heterogeneous) - T

    要插入到输入序列中的输入张量。

  • position (可选, heterogeneous) - I

    插入新张量在序列中的位置。它是可选的,默认为插入到序列的末尾。负值表示从末尾开始计数。接受范围在 [-n, n] 中,其中 n 是 'input_sequence' 中的张量数量。如果任何索引值超出范围,则为错误。它必须是一个标量(空形状的张量)。

输出

  • output_sequence (heterogeneous) - S

    输出序列,其中包含在给定位置插入的张量。

类型约束

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

    约束为任何张量类型。

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

    约束为任何张量类型。

  • I 在 ( tensor(int32), tensor(int64) )

    约束位置为整数张量。它必须是一个标量(空形状的张量)。