
pytorch
jeffery0628
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
pytorch学习笔记1--开发环境安装(windows)
先附两个api文章目录开发环境安装(windows)开发环境安装(windows)安装anaconda勾选 Add Anaconda to my PATH environment variable安装CUDA10到CUDA官网下载,选择local 版本安装过程中如果没有CUDA Visual Studio Integration 可以勾选然后跳过如果在cuda>v1...原创 2019-06-12 17:19:23 · 387 阅读 · 0 评论 -
pytorch学习笔记2--梯度下降的介绍
梯度下降给定y=x2∗sinxy=x^2*sinxy=x2∗sinx它的导数:y′=2xsinx+x2cosxy'=2xsinx + x^2cosxy′=2xsinx+x2cosx则梯度下降对x进行更新:x′=x−lr∗Δxx'=x-lr * \Delta xx′=x−lr∗Δx噪声exampleoptimize...原创 2019-06-12 17:25:40 · 525 阅读 · 0 评论 -
pytorch学习笔记3--回归问题
回归问题linear regressiony∈[−∞,+∞]y \in [-\infty, +\infty]y∈[−∞,+∞]logistics regression把y值压缩到[0,1],变为概率问题代码:loss=(WX+b−y)2loss = (WX+b-y)^2loss=(WX+b−y)2代码实现如下: def compute_error_for_line_...原创 2019-06-12 17:45:25 · 265 阅读 · 0 评论 -
pytorch学习笔记4--pytorch数据类型
文章目录pytorch 数据类型创建tensor将numpy数据转化为Tensor:从python list中导入数据:uninitialized设置默认类型:随机初始化,rand/rand_like,randint正态分布:randn全部赋值为相同的元素:torch.arange(start,end,step)等分:torch.eye(d1,d2) or torch.eye(num)randpe...原创 2019-06-12 17:49:35 · 4145 阅读 · 0 评论 -
pytorch学习笔记5--pytorch基本运算
文章目录基本运算add/minus/multiply/dividematmul基本函数统计属性normmean,sum,min,max,prod,argmin,argmaxkthvalue,topk\>,>=,<,<=,!=,==高阶操作(GPU)whereGather梯度lossMean Squared Error(MSE):自动求导:torch.autograd.gra...原创 2019-06-12 20:26:28 · 6603 阅读 · 0 评论 -
pytorch学习笔记5--pytorch基本运算2
文章目录感知机的梯度推导单输出单层感知机多输出感知机梯度推导链式法则多层感知机反向传播Logistic regressionQ1: why not maximize accuracy?Q2 : why call logistic regressionsoftmax交叉熵EntropyCross Entropy对于分类问题为什么不用MSEsoftmax 和 sigmoid?多分类全连接层nn.ReL...原创 2019-07-24 09:27:59 · 1114 阅读 · 0 评论 -
pytorch学习笔记6--过拟合,交叉验证,正则化
文章目录过拟合过拟合、欠拟合交叉验证regularization动量与学习率衰减dropout ,early stop卷积神经网络resnet densenetnn.Module数据增强实战lenet5resnet过拟合过拟合、欠拟合交叉验证regularizationoccam’s razormore things should not be used than are nec...原创 2019-07-24 09:31:43 · 2936 阅读 · 0 评论 -
pytorch学习笔记7--循环神经网络、GAN
文章目录循环神经网络序列的表示方法RNN Layer的使用nn.RNNnn.RNNCell预测sin(x)曲线trainpredict梯度弥散和梯度爆炸gradient clippinggradient vanishingLSTM 的使用LSTMCell 的使用情感分类实战GAN损失纳什均衡transposed convolutionWGAN 使用wassertein Distance 代替了Di...原创 2019-07-24 10:32:30 · 1335 阅读 · 1 评论