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