mindspore.mint.square
=====================

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


.. py:function:: mindspore.mint.square(input)

    逐元素计算tensor的平方。

    .. math::
        y_i = input_i ^ 2

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

    返回:
        Tensor。