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

#### 产品支持情况

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


#### 函数功能

获取Tensor中的元素的个数。


#### 函数原型

```
int64_t GetElementCnt() const
```


#### 参数说明

无。


#### 返回值

返回Tensor中的元素的个数。


#### 异常处理

无。


#### 约束说明

无。
