从shape中获取axis对应的非1维度数值组成的列表。
def refine_axis(axis, shape)
参数 |
说明 |
---|---|
axis |
轴,可以是int类型的值或者int类型的列表。 axis必须在shape的实际维度范围内,不能越界。 |
shape |
shape数据。 |
axis对应的非1维度数值组成的列表。
无
from tbe.common.utils import shape_util shape_util.refine_axis(-1, (1, 32, 32, 3))
返回[3]。