megengine.Tensor.astype

Tensor.astype(dtype)

Returns a Tensor with the same data and number of elements with the specified dtype.