SequenceMap¶
SequenceMap - 17¶
版本¶
網域:
main
since_version:
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)
)約束為任何張量或序列類型。