mindspore.ops.zeros_like
- mindspore.ops.zeros_like(input, *, dtype=None)[source]
Return a tensor filled with 0, with the same size as input .
- Parameters
input (Tensor) – The input tensor.
- Keyword Arguments
dtype (
mindspore.dtype, optional) – The data type specified. DefaultNonerepresents the same data type as the input.- Returns
Tensor
- Supported Platforms:
AscendGPUCPU
Examples
>>> import mindspore >>> input = mindspore.ops.arange(4) >>> mindspore.ops.zeros_like(input) Tensor(shape=[4], dtype=Int64, value= [0, 0, 0, 0])