Shape¶
Shape - 24¶
版本¶
名称: Shape (GitHub)
域:
main
起始版本:
24
函数:
False
支持级别:
SupportType.COMMON
形状推断:
True
此版本的操作符已可用于版本 24 及以上。
摘要¶
接收一个张量作为输入,并输出一个包含输入张量形状的 1D int64 张量。可选的 start 和 end 属性可用于计算输入张量形状的切片。如果省略 start 轴,则切片从轴 0 开始。如果指定了 end 轴,则它是排他的(返回的值将不包含该轴的大小)。如果省略 end 轴,则包含直到最后一个轴的轴。负轴表示从最后一个轴开始倒数。请注意,轴将被限制在 [0, r] 的范围内,其中 r 是输入张量的秩(在负轴情况下加上 r 之后)。因此,指定任何大于 r 的 end 值等同于指定 end 值为 r,指定任何小于 -r 的 start 值等同于指定 start 值为 0。如果 start > end,则结果将是空形状。
示例
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(float8e8m0)
,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 张量。
Shape - 23¶
版本¶
名称: Shape (GitHub)
域:
main
起始版本:
23
函数:
False
支持级别:
SupportType.COMMON
形状推断:
True
此版本的操作符已可用于版本 23 及以上。
摘要¶
接收一个张量作为输入,并输出一个包含输入张量形状的 1D int64 张量。可选的 start 和 end 属性可用于计算输入张量形状的切片。如果省略 start 轴,则切片从轴 0 开始。如果指定了 end 轴,则它是排他的(返回的值将不包含该轴的大小)。如果省略 end 轴,则包含直到最后一个轴的轴。负轴表示从最后一个轴开始倒数。请注意,轴将被限制在 [0, r] 的范围内,其中 r 是输入张量的秩(在负轴情况下加上 r 之后)。因此,指定任何大于 r 的 end 值等同于指定 end 值为 r,指定任何小于 -r 的 start 值等同于指定 start 值为 0。如果 start > end,则结果将是空形状。
示例
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 张量。
Shape - 21¶
版本¶
名称: Shape (GitHub)
域:
main
since_version:
21
函数:
False
支持级别:
SupportType.COMMON
形状推断:
True
此版本的操作符自 版本 21 起可用。
摘要¶
接收一个张量作为输入,并输出一个包含输入张量形状的 1D int64 张量。可选的 start 和 end 属性可用于计算输入张量形状的切片。如果省略 start 轴,则切片从轴 0 开始。如果指定了 end 轴,则它是排他的(返回的值将不包含该轴的大小)。如果省略 end 轴,则包含直到最后一个轴的轴。负轴表示从最后一个轴开始倒数。请注意,轴将被限制在 [0, r] 的范围内,其中 r 是输入张量的秩(在负轴情况下加上 r 之后)。因此,指定任何大于 r 的 end 值等同于指定 end 值为 r,指定任何小于 -r 的 start 值等同于指定 start 值为 0。如果 start > end,则结果将是空形状。
示例
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 张量。
Shape - 19¶
版本¶
名称: Shape (GitHub)
域:
main
since_version:
19
函数:
False
支持级别:
SupportType.COMMON
形状推断:
True
此版本的操作符自 版本 19 起可用。
摘要¶
接收一个张量作为输入,并输出一个包含输入张量形状的 1D int64 张量。可选的 start 和 end 属性可用于计算输入张量形状的切片。如果省略 start 轴,则切片从轴 0 开始。如果指定了 end 轴,则它是排他的(返回的值将不包含该轴的大小)。如果省略 end 轴,则包含直到最后一个轴的轴。负轴表示从最后一个轴开始倒数。请注意,轴将被限制在 [0, r] 的范围内,其中 r 是输入张量的秩(在负轴情况下加上 r 之后)。因此,指定任何大于 r 的 end 值等同于指定 end 值为 r,指定任何小于 -r 的 start 值等同于指定 start 值为 0。如果 start > end,则结果将是空形状。
示例
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 张量。
Shape - 15¶
版本¶
名称: Shape (GitHub)
域:
main
起始版本:
15
函数:
False
支持级别:
SupportType.COMMON
形状推断:
True
此版本的操作符自版本 15 起可用。
摘要¶
接收一个张量作为输入,并输出一个包含输入张量形状的 1D int64 张量。可选的 start 和 end 属性可用于计算输入张量形状的切片。如果省略 start 轴,则切片从轴 0 开始。如果指定了 end 轴,则它是排他的(返回的值将不包含该轴的大小)。如果省略 end 轴,则包含直到最后一个轴的轴。负轴表示从最后一个轴开始倒数。请注意,轴将被限制在 [0, r] 的范围内,其中 r 是输入张量的秩(在负轴情况下加上 r 之后)。因此,指定任何大于 r 的 end 值等同于指定 end 值为 r,指定任何小于 -r 的 start 值等同于指定 start 值为 0。如果 start > end,则结果将是空形状。
示例
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 张量。
Shape - 13¶
版本¶
名称: Shape (GitHub)
域:
main
起始版本:
13
函数:
False
支持级别:
SupportType.COMMON
形状推断:
True
此版本的运算符自 版本 13 起可用。
摘要¶
接收一个张量作为输入,并输出一个包含输入张量形状的 1D 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 张量。
Shape - 1¶
版本¶
名称: Shape (GitHub)
域:
main
起始版本:
1
函数:
False
支持级别:
SupportType.COMMON
形状推断:
True
此版本的运算符自 版本 1 起可用。
摘要¶
接收一个张量作为输入,并输出一个包含输入张量形状的 1D 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 张量。