Article directory
type of data
Correspondence between data types in python and pytorch
Note: pytorch does not have a string type
Example 1: Create a random number array with 3 rows and 4 columns, conforming to the normal distribution with mean 0 and variance 1
import torch
a=torch.Tensor(3,4)
a
Out[17]