---
title: get_data_size
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/others/dataflowdevg/udfrefp_23_0025.html
sourcePath: /source/zh/canncommercial/900/others/dataflowdevg/udfrefp_23_0025.html
indexId: 349d1415af98bd3b605c99ff06b5dd5f5924490dc96551ed1d57b47098ac815470
---
# get_data_size

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | x |
| Atlas 推理系列产品 | x |
| Atlas 训练系列产品 | x |


#### 函数功能

获取Tensor中的数据大小。


#### 函数原型

```
get_data_size(self) -> int
```


#### 参数说明

无


#### 返回值

返回Tensor的数据大小。


#### 异常处理

无


#### 约束说明

修改返回的TensorDesc信息，不影响Tensor对象中已有的TensorDesc信息。
