摘要: 4.2.0 头文件 import torch from torch import nn from d2l import torch as d2l from matplotlib import pyplot as plt 4.2.1 下载fashion_mnist数据集 # 定义批量大小 batch_ 阅读全文
posted @ 2022-11-03 23:52 yc-limitless 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 4.1.0 头文件 import torch from d2l import torch as d2l from matplotlib import pyplot as plt 4.1.1 Relu激活函数 x = torch.arange(-8.0, 8.0, 0.1, requires_grad 阅读全文
posted @ 2022-11-03 23:06 yc-limitless 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 3.7.0 头文件 import torch from torch import nn from d2l import torch as d2l from matplotlib import pyplot as plt 3.7.1 下载fashion_mnist数据集 # 定义批量大小 batch_ 阅读全文
posted @ 2022-11-03 22:52 yc-limitless 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 3.6.0 头文件 import torch from IPython import display from d2l import torch as d2l from matplotlib import pyplot as plt 3.6.1 训练结果可视化 class Animator: """ 阅读全文
posted @ 2022-11-03 21:21 yc-limitless 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 解决方法有两个: 方案1:定位到d2l文件夹下的torch.py文件,找到 get_dataloader_workers() 函数: # Defined in file: ./chapter_linear-networks/image-classification-dataset.md def ge 阅读全文
posted @ 2022-11-03 19:53 yc-limitless 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 3.5.0 头文件 import torch import torchvision from torch.utils import data from torchvision import transforms from d2l import torch as d2l from matplotlib 阅读全文
posted @ 2022-11-03 17:34 yc-limitless 阅读(84) 评论(0) 推荐(0) 编辑