The difference between torch.Tensor and torch.tensor() and other Tensor types in Pytorch

  1. torch.Tensor() is the abbreviation of torch.FloatTensor() by default, and the created float32-bit data type;
  2. torch.tensor() is a copy of tensor data and creates Tensor according to the type of incoming data;
  3. Other data types, such as LongTensor, FloatTensor, etc., are created corresponding data types;

Guess you like

Origin blog.csdn.net/qq_29027865/article/details/104298210