---
title: GetDataTypeSize
description: "用于获取Tensor的数据类型。根据TensorDataType的具体类型返回该类型字节长度。"
url: https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/latest/Application%20Development%20Guide/msadg/mxvisionug_0437.html
sourcePath: /source/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application Development Guide/msadg/mxvisionug_0437.html
indexId: 8df4414b30ee4431894f7e789b6f01771c426a4c4c2e51b62ce1e44a2dea0d6a102
---
# GetDataTypeSize

#### 函数功能

用于获取Tensor的数据类型。根据TensorDataType的具体类型返回该类型字节长度。


#### 函数原型

```
uint32_t GetDataTypeSize() const;
```


#### 返回参数说明

| 数据结构 | 说明 |
| --- | --- |
| uint32\_t | Tensor的数据类型对应的字节长度。 |
