SequenceInsert¶
SequenceInsert - 11¶
版本¶
網域:
main
since_version:
11
函式:
False
支援層級:
SupportType.COMMON
形狀推斷:
True
此版本的運算子自版本 11 起可用。
摘要¶
輸出一個張量序列,該序列將「張量」插入「input_sequence」中的「位置」。 「張量」必須與「input_sequence」具有相同的資料類型。「位置」的接受範圍為 [-n, n]
,其中 n
是「input_sequence」中張量的數量。負值表示從後面計算位置。「位置」是選用的,預設情況下,它會將「張量」插入「input_sequence」的後面。
輸入¶
介於 2 到 3 個輸入之間。
input_sequence (異質) - S
輸入序列。
tensor (異質) - T
要插入輸入序列的輸入張量。
position (選用,異質) - I
插入新張量的序列中的位置。它是選用的,預設值是插入到序列的後面。負值表示從後面計算位置。接受的範圍為
[-n, n]
,其中n
是「input_sequence」中張量的數量。如果任何索引值超出範圍,則會發生錯誤。它必須是純量(空形狀的張量)。
輸出¶
output_sequence (異質) - S
包含在指定位置插入的張量的輸出序列。
類型約束¶
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)
)約束為任何張量類型。
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(int32)
,tensor(int64)
)將位置約束為整數張量。它必須是純量(空形狀的張量)。