SequenceAt

SequenceAt - 11

版本

  • 名称: SequenceAt (GitHub)

  • 域名: main

  • since_version: 11

  • 函数: False

  • support_level: SupportType.COMMON

  • 形状推断: True

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

摘要

从‘input_sequence’中的‘position’位置输出一个张量副本。 ‘position’的接受范围在[-n, n - 1]之间,其中n是‘input_sequence’中张量的数量。 负值表示从后面开始计数位置。

输入

  • input_sequence (异构) - S:

    输入序列。

  • position(异构) - I

    张量在序列中的位置。负值表示从后面开始计数位置。接受的范围在[-n, n - 1],其中n是'input_sequence'中张量的数量。如果任何索引值超出范围,则会出现错误。它必须是一个标量(空形状的张量)。

输出

  • 张量 (异构) - 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) ):

    约束为任何张量类型。

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

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