跟着Dive-into-DL-PyTorch.pdf从头开始学pytorch,夯实基础. Tensor创建 创建未初始化的tensor import torch x = torch.empty(5,3) print(x) 输出 tensor([[ 2.0909e+21, 3.0638e-41, -2.4612e-30], [ 4.5650e-41, 3.0638e-41, 1.7753e+28], [ 4.4339e+27, 1.3848e-14, 6.8801e+16], [ 1.8370e+…