This document is relevant for: Trn1, Trn2, Trn3
nki.language.zeros_like#
- nki.language.zeros_like(x, dtype=None, buffer=None, name='')[source]#
Create a new tensor of zeros with the same shape and type as a given tensor.
((Similar to numpy.zeros_like))
Warning
This API is experimental and may change in future releases.
- Parameters:
x – the tensor.
dtype – the data type of the tensor.
buffer – the specific buffer (ie, sbuf, psum, hbm), defaults to sbuf.
name – the name of the tensor.
- Returns:
a tensor of zeros with the same shape as
x.
This document is relevant for: Trn1, Trn2, Trn3