mindspore.ops.rsqrt
====================

.. 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_rsqrt.rst
    :alt: 查看源文件


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

    逐元素计算输入Tensor元素的平方根倒数。

    .. math::
        out_{i} =  \frac{1}{\sqrt{input_{i}}}

    参数:
        - **input** (Tensor) - rsqrt的输入Tensor,其每个元素都为非负,若某个元素为负,计算结果为nan。

    返回:
        Tensor,具有与 `input` 相同的shape。

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