
动手深度学习
眼镜腹黑宅
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
08线性回归的简单实现-动手学深度学习
import numpy as np import torch from torch.utils import data from d2l import torch as d2l #制作数据集 def syn_data(w,b,num_examples): x = torch.normal(0,1,(num_examples,len(w))) y = torch.matmul(x,w)+b y=y +torch.normal(0,0.01,y.shape) return x原创 2021-10-04 10:36:15 · 144 阅读 · 0 评论 -
08线性回归从零开始实现-动手学深度学习
%matplotlib inline import random import torch from d2l import torch as d2l #制作数据集 def syn_data(w,b,num_examples): x = torch.normal(0,1,(num_examples,len(w))) y = torch.matmul(x,w)+b y=y +torch.normal(0,0.01,y.shape) return x,y.reshape((-1,原创 2021-10-03 22:46:31 · 127 阅读 · 0 评论 -
04数据操作复盘-动手学习深度学习(pytorch)
import torch x = torch.arange(12) x tensor([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]) x.shape torch.Size([12]) x.numel() 12 x=x.reshape(3,4) x tensor([[ 0, 1, 2, 3], [ 4, 5, 6, 7], [ 8, 9, 10, 11]]) torch.zeros((2,3,4)) tensor([[[0., 0.,原创 2021-10-03 11:48:42 · 168 阅读 · 0 评论