06 2024 档案

摘要:import torch from d2l import torch as d2l from torch import nn batch_size = 100 train_iter , test_iter = d2l.load_data_fashion_mnist(batch_size=batch_ 阅读全文
posted @ 2024-06-24 13:31 Mr小明同学 阅读(30) 评论(0) 推荐(0) 编辑
摘要:import torch from d2l import torch as d2l batch_size = 50 train_iter , test_iter = d2l.load_data_fashion_mnist(batch_size ) help(d2l.load_data_fashion 阅读全文
posted @ 2024-06-23 13:47 Mr小明同学 阅读(11) 评论(0) 推荐(0) 编辑
摘要:import torchtext from torchvision import transforms from torch.utils import data from d2l import torch as d2l import torchvision trans = transforms.To 阅读全文
posted @ 2024-06-23 10:49 Mr小明同学 阅读(14) 评论(0) 推荐(0) 编辑
摘要:import random import torch def generate_date(W,b,num_examples): X = torch.normal(0,1,(num_examples , len(W))) noise = torch.normal(0,0.01 , (num_examp 阅读全文
posted @ 2024-06-22 23:52 Mr小明同学 阅读(19) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示