[In-depth understanding of PyTorch] The use of PyTorch tensor (Tensor)

Use of PyTorch tensor (Tensor)

In PyTorch, tensor (Tensor) is the main data structure used to store and manipulate data. It is a multidimensional array that can be regarded as a data set that can be used for tasks such as training, inference, and prediction of deep learning models. This article will introduce the definition, creation, operation and usage scenarios of PyTorch tensors.

1. Definition of PyTorch tensor

In PyTorch, a tensor is a multidimensional array whose element types can be integers, floating point numbers, or Boolean values, etc. The dimension of tensor is called rank (rank)

Guess you like

Origin blog.csdn.net/m0_61531676/article/details/131731738