SequenceMap¶
SequenceMap - 17¶
版本¶
域:
main起始版本:
17函数:
True支持级别:
SupportType.COMMON形状推断:
True
此版本的运算符自 版本 17 起可用。
摘要¶
将子图应用于输入序列中的每个样本。
输入可以是张量或序列,但第一个输入必须是序列。第一个输入序列的长度将决定输出中的样本数量。任何其他序列输入应具有相同的样本数量。输入和输出的数量应与子图的输入和输出数量匹配。
对于输出中的每个第 i 个元素,将从输入序列的第 i 个位置提取一个样本,并对其应用子图。输出将包含子图对每个样本的输出,其顺序与输入中的顺序相同。
此运算符假定处理每个样本是独立的,可以并行或以任何顺序执行。用户不能期望每个子图的计算顺序是特定的。
属性¶
body - GRAPH (必填)
对序列中的每个样本运行的图。它应该具有与 SequenceMap 函数的输入和输出数量相同的输入和输出。
输入¶
输入数量介于 1 到 2147483647 之间。
input_sequence (异构) - S
输入序列。
additional_inputs (可变参数) - V
图的额外输入
输出¶
1 到 2147483647 个输出之间。
out_sequence (可变参数) - S
输出序列
类型约束¶
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)))将输入类型限制为任何序列类型。
V 类型为 (
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)),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))限制为任何张量或序列类型。