nki.language.empty_like — AWS Neuron Documentation (original) (raw)

This document is relevant for: Inf2, Trn1, Trn2

nki.language.empty_like#

nki.language.empty_like(a, dtype=None, *, buffer=None, name='', **kwargs)[source]#

Create a new tensor with the same shape and type as a given tensor.

((Similar to numpy.empty_like))

Parameters:

Returns:

a tensor with the same shape and type as a given tensor.

This document is relevant for: Inf2, Trn1, Trn2