文章分类 - 神经网络
摘要:识别cifar数据集 import torchvision as tv import torch as t import torchvision.transforms as transforms import matplotlib.pyplot as plt import torch.nn as n
阅读全文
摘要:卷积神经网络识别mnist手写数据集 import torch import torch.nn.functional as F from torchvision import transforms from torchvision import datasets from torch.utils.d
阅读全文
摘要:线性回归 import torch import matplotlib.pyplot as plt #生成一组数据 torch.manual_seed(100) def get_fake_data(batch_size=8): x=torch.rand(batch_size,1)*10 y=x*2+
阅读全文
摘要:识别mnist手写数据集 加载数据集 #转变数形 transform = transforms.Compose([ transforms.ToTensor(), transforms.Normalize((0.1307, ),(0.3081, )) ]) #加载数据 batch_size = 4 t
阅读全文