Installation
Development
High-level design
Python API (PyAsc2)
Python API (PyAsc)
TensorDesc
TensorDesc.get_dim()
ListTensorDesc
MLIR
获取Tensor的维度。
对应的Ascend C函数原型
uint64_t GetDim()
返回值说明
返回Tensor的维度。
调用示例
tensor_desc = asc.TensorDesc() dim = tensor_desc.get_dim()