mindspore.ops.zeros_like ========================= .. 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/ops/mindspore.ops.func_zeros_like.rst :alt: 查看源文件 .. py:function:: mindspore.ops.zeros_like(input, *, dtype=None) 创建一个填满0的Tensor,shape由 `input` 决定,dtype由 `dtype` 决定。 参数: - **input** (Tensor) - 用来描述所创建的Tensor的shape 。 关键字参数: - **dtype** (:class:`mindspore.dtype`, 可选) - 用来描述所创建的Tensor的 `dtype`。如果为 ``None`` ,那么将会使用 `input` 的dtype。默认值: ``None`` 。 返回: Tensor,dtype和shape由入参决定。 异常: - **TypeError** - 如果 `dtype` 不是MindSpore的dtype。