SequenceLength

SequenceLength - 11

版本

  • 名称: SequenceLength (GitHub)

  • 领域: main

  • 起始版本: 11

  • 函数: False

  • 支持级别: SupportType.COMMON

  • Shape 推断: True

该版本的算子自版本 11 起可用。

摘要

生成一个标量(空 shape 的张量),其中包含 'input_sequence' 中的张量数量。

输入

  • input_sequence (异构) - S

    输入序列。

输出

  • length (异构) - I

    输入序列的长度。它必须是一个标量(空 shape 的张量)。

类型约束

  • 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(int64) ) 中

    将输出约束为整数张量。它必须是一个标量(空 shape 的张量)。