- 基础Tensor(张量)操作
TODO - 创建线性(玩具)数据集
import torch
from torch import nn
import matplotlib.pyplot as pltdevice = "cuda" if torch.cuda.is_available() else "cpu"
print(device)# create data
weight = 0.6
bias = 0.4
start = 0
end = 1
ste[......]
PyTorch学习笔记
Leave a reply