megengine.Tensor.tolist#

Tensor.tolist()#

Returns the tensor as a (nested) list. For scalars, a standard Python number is returned, just like with item. Tensors are automatically moved to the CPU first if necessary.

This operation is not differentiable.