mindspore.ops.numel
====================

.. image:: https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/r2.2/resource/_static/logo_source.svg
    :target: https://gitee.com/mindspore/mindspore/blob/r2.2/docs/api/api_python/ops/mindspore.ops.func_numel.rst
    :alt: 查看源文件


.. py:function:: mindspore.ops.numel(input)

    返回Tensor的元素的总数量。

    参数:
        - **input** (Tensor) - 输入Tensor。

    返回:
        int。Tensor的元素的总数量。

    异常:
        - **TypeError** - `input` 不是Tensor。