软件测试丨PyTorch 简介
import torchimport torch.nn as nnimport torch.optim as optim# 生成数据x = torch.randn(100, 1)y = 2 * x + 1 + 0.1 * torch.randn(100, 1)
import torchimport torch.nn as nnimport torch.optim as optim# 生成数据x = torch.randn(100, 1)y = 2 * x + 1 + 0.1 * torch.randn(100, 1)