形狀¶
形狀 - 23¶
版本¶
名稱: Shape (GitHub)
網域:
main
since_version:
23
函數:
False
支援等級:
SupportType.COMMON
形狀推斷:
True
此版本的運算子自第 23 版開始提供。
摘要¶
將張量作為輸入,並輸出一個 1D int64 張量,其中包含輸入張量的形狀。選用屬性 start 和 end 可用於計算輸入張量形狀的切片。如果省略起始軸,則切片從軸 0 開始。如果指定了結束軸,則該軸是排除的(且傳回的值將不包含該軸的大小)。如果省略結束軸,則會包含直到最後一個軸的軸。負軸表示從最後一個軸向後數。請注意,如果軸超出範圍(在負軸的情況下加上 r 後),軸將被限制在範圍 [0, r-1] 內,其中 r 是輸入張量的秩。因此,指定任何大於 r 的結束值都等同於指定 r 的結束值,而指定任何小於 -r 的起始值都等同於指定 0 的起始值。
範例
Input tensor with shape: [2, 3, 4]
No attributes specified.
Output: [2, 3, 4]
Input tensor with shape: [2, 3, 4]
start: -1
Output: [4]
Input tensor with shape: [2, 3, 4]
end: -1
Output: [2, 3]
Input tensor with shape: [2, 3, 4]
start: 1
end: 2
Output: [3]
屬性¶
end - INT :
(選用)用於切分形狀的結束軸。負值表示從後方計數維度。如果省略,則會包含直到(包含)最後一個軸的所有軸大小。
start - INT(預設為
'0'
)(選用)用於切分形狀的起始軸。預設值為 0。負值表示從後方計數維度。
輸入¶
data (異質) - T
輸入張量。
輸出¶
shape (異質) - T1
輸入張量的形狀
類型限制¶
T 在 (
tensor(bfloat16)
,tensor(bool)
,tensor(complex128)
,tensor(complex64)
,tensor(double)
,tensor(float)
,tensor(float16)
,tensor(float4e2m1)
,tensor(float8e4m3fn)
,tensor(float8e4m3fnuz)
,tensor(float8e5m2)
,tensor(float8e5m2fnuz)
,tensor(int16)
,tensor(int32)
,tensor(int4)
,tensor(int64)
,tensor(int8)
,tensor(string)
,tensor(uint16)
,tensor(uint32)
,tensor(uint4)
,tensor(uint64)
,tensor(uint8)
)輸入張量可以是任意類型。
T1 在 (
tensor(int64)
)將輸出限制為 int64 張量。
形狀 - 21¶
版本¶
名稱: Shape (GitHub)
網域:
main
since_version:
21
函數:
False
支援等級:
SupportType.COMMON
形狀推斷:
True
此版本的運算子自第 21 版開始提供。
摘要¶
將張量作為輸入,並輸出一個 1D int64 張量,其中包含輸入張量的形狀。選用屬性 start 和 end 可用於計算輸入張量形狀的切片。如果省略起始軸,則切片從軸 0 開始。如果指定了結束軸,則該軸是排除的(且傳回的值將不包含該軸的大小)。如果省略結束軸,則會包含直到最後一個軸的軸。負軸表示從最後一個軸向後數。請注意,如果軸超出範圍(在負軸的情況下加上 r 後),軸將被限制在範圍 [0, r-1] 內,其中 r 是輸入張量的秩。因此,指定任何大於 r 的結束值都等同於指定 r 的結束值,而指定任何小於 -r 的起始值都等同於指定 0 的起始值。
範例
Input tensor with shape: [2, 3, 4]
No attributes specified.
Output: [2, 3, 4]
Input tensor with shape: [2, 3, 4]
start: -1
Output: [4]
Input tensor with shape: [2, 3, 4]
end: -1
Output: [2, 3]
Input tensor with shape: [2, 3, 4]
start: 1
end: 2
Output: [3]
屬性¶
end - INT :
(選用)用於切分形狀的結束軸。負值表示從後方計數維度。如果省略,則會包含直到(包含)最後一個軸的所有軸大小。
start - INT(預設為
'0'
)(選用)用於切分形狀的起始軸。預設值為 0。負值表示從後方計數維度。
輸入¶
data (異質) - T
輸入張量。
輸出¶
shape (異質) - T1
輸入張量的形狀
類型限制¶
T 在 (
tensor(bfloat16)
,tensor(bool)
,tensor(complex128)
,tensor(complex64)
,tensor(double)
,tensor(float)
,tensor(float16)
,tensor(float8e4m3fn)
,tensor(float8e4m3fnuz)
,tensor(float8e5m2)
,tensor(float8e5m2fnuz)
,tensor(int16)
,tensor(int32)
,tensor(int4)
,tensor(int64)
,tensor(int8)
,tensor(string)
,tensor(uint16)
,tensor(uint32)
,tensor(uint4)
,tensor(uint64)
,tensor(uint8)
)輸入張量可以是任意類型。
T1 在 (
tensor(int64)
)將輸出限制為 int64 張量。
形狀 - 19¶
版本¶
名稱: Shape (GitHub)
網域:
main
since_version:
19
函數:
False
支援等級:
SupportType.COMMON
形狀推斷:
True
此版本的運算子自第 19 版開始提供。
摘要¶
將張量作為輸入,並輸出一個 1D int64 張量,其中包含輸入張量的形狀。選用屬性 start 和 end 可用於計算輸入張量形狀的切片。如果省略起始軸,則切片從軸 0 開始。如果指定了結束軸,則該軸是排除的(且傳回的值將不包含該軸的大小)。如果省略結束軸,則會包含直到最後一個軸的軸。負軸表示從最後一個軸向後數。請注意,如果軸超出範圍(在負軸的情況下加上 r 後),軸將被限制在範圍 [0, r-1] 內,其中 r 是輸入張量的秩。因此,指定任何大於 r 的結束值都等同於指定 r 的結束值,而指定任何小於 -r 的起始值都等同於指定 0 的起始值。
範例
Input tensor with shape: [2, 3, 4]
No attributes specified.
Output: [2, 3, 4]
Input tensor with shape: [2, 3, 4]
start: -1
Output: [4]
Input tensor with shape: [2, 3, 4]
end: -1
Output: [2, 3]
Input tensor with shape: [2, 3, 4]
start: 1
end: 2
Output: [3]
屬性¶
end - INT :
(選用)用於切分形狀的結束軸。負值表示從後方計數維度。如果省略,則會包含直到(包含)最後一個軸的所有軸大小。
start - INT(預設為
'0'
)(選用)用於切分形狀的起始軸。預設值為 0。負值表示從後方計數維度。
輸入¶
data (異質) - T
輸入張量。
輸出¶
shape (異質) - T1
輸入張量的形狀
類型約束¶
T 屬於 (
tensor(bfloat16)
,tensor(bool)
,tensor(complex128)
,tensor(complex64)
,tensor(double)
,tensor(float)
,tensor(float16)
,tensor(float8e4m3fn)
,tensor(float8e4m3fnuz)
,tensor(float8e5m2)
,tensor(float8e5m2fnuz)
,tensor(int16)
,tensor(int32)
,tensor(int64)
,tensor(int8)
,tensor(string)
,tensor(uint16)
,tensor(uint32)
,tensor(uint64)
,tensor(uint8)
)輸入張量可以是任意類型。
T1 在 (
tensor(int64)
)將輸出限制為 int64 張量。
形狀 - 15¶
版本¶
名稱: Shape (GitHub)
網域:
main
since_version:
15
函數:
False
支援等級:
SupportType.COMMON
形狀推斷:
True
此運算子的版本從版本 15 開始提供。
摘要¶
將張量作為輸入,並輸出一個 1D int64 張量,其中包含輸入張量的形狀。選用屬性 start 和 end 可用於計算輸入張量形狀的切片。如果省略起始軸,則切片從軸 0 開始。如果指定了結束軸,則該軸是排除的(且傳回的值將不包含該軸的大小)。如果省略結束軸,則會包含直到最後一個軸的軸。負軸表示從最後一個軸向後數。請注意,如果軸超出範圍(在負軸的情況下加上 r 後),軸將被限制在範圍 [0, r-1] 內,其中 r 是輸入張量的秩。因此,指定任何大於 r 的結束值都等同於指定 r 的結束值,而指定任何小於 -r 的起始值都等同於指定 0 的起始值。
範例
Input tensor with shape: [2, 3, 4]
No attributes specified.
Output: [2, 3, 4]
Input tensor with shape: [2, 3, 4]
start: -1
Output: [4]
Input tensor with shape: [2, 3, 4]
end: -1
Output: [2, 3]
Input tensor with shape: [2, 3, 4]
start: 1
end: 2
Output: [3]
屬性¶
end - INT :
(選用)用於切分形狀的結束軸。負值表示從後方計數維度。如果省略,則會包含直到(包含)最後一個軸的所有軸大小。
start - INT(預設為
'0'
)(選用)用於切分形狀的起始軸。預設值為 0。負值表示從後方計數維度。
輸入¶
data (異質) - T
輸入張量。
輸出¶
shape (異質) - T1
輸入張量的形狀
類型約束¶
T 屬於 (
tensor(bfloat16)
,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)
)輸入張量可以是任意類型。
T1 在 (
tensor(int64)
)將輸出限制為 int64 張量。
形狀 - 13¶
版本¶
名稱: Shape (GitHub)
網域:
main
since_version:
13
函數:
False
支援等級:
SupportType.COMMON
形狀推斷:
True
此運算子的版本從版本 13 開始提供。
摘要¶
將一個張量作為輸入,並輸出一個包含輸入張量形狀的 1 維 int64 張量。
輸入¶
data (異質) - T
輸入張量。
輸出¶
shape (異質) - T1
輸入張量的形狀
類型約束¶
T 屬於 (
tensor(bfloat16)
,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)
)輸入張量可以是任意類型。
T1 在 (
tensor(int64)
)將輸出限制為 int64 張量。
形狀 - 1¶
版本¶
名稱: Shape (GitHub)
網域:
main
since_version:
1
函數:
False
支援等級:
SupportType.COMMON
形狀推斷:
True
此運算子的版本從版本 1 開始提供。
摘要¶
將一個張量作為輸入,並輸出一個包含輸入張量形狀的 1 維 int64 張量。
輸入¶
data (異質) - T
輸入張量。
輸出¶
shape (異質) - T1
輸入張量的形狀
類型約束¶
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)
)輸入張量可以是任意類型。
T1 在 (
tensor(int64)
)將輸出限制為 int64 張量。