Properties of the Tensor Classes

Property Name

Description

Remarks

device

ID of the device where the tensor is located

The value -1 indicates that the tensor is running on the host. The value 1 indicates the device ID is 1, the value 2 indicates the device ID is 2, and the rest can be deduced by analogy.

dtype

Tensor data type

Data of the base.dtype

shape

Tensor dimension information

The returned data is of the list type.