![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
深度学习基础知识
自己学习过程中遇到的问题
多笑一笑啊
冥王星不见了
展开
-
nn.Linear和nn.BatchNorm1的维度问题
import torch import torch.nn as nn input=torch.randn([32,49,768]) l=nn.Linear(768,512) out=l(input) print(out.shape) # torch.Size([32, 49, 512]) # l=nn.Linear(49,512) # mat1 and mat2 shapes cannot be multiplied (1568x768 and 49x512) # 说明了执行linear时,输入的cha原创 2021-09-10 17:10:57 · 1680 阅读 · 1 评论 -
对神经网络中参数w和b的理解
在学习和神经网络的过程,我们通常会遇到这样一个式子:x=wu+b,u是输入,那么到底为什么要有w和b这样的参数呢? 发现有一个很好的文章,挂上链接 在清楚了为什么要有这两个参数,我们来探讨这两参数是如何更新的? 根据梯度下降算法公式,令损失函数对两个参数分别求导,再进行更新。这里参考了吴恩达老师机器学习课程的相关讲义。 ...原创 2020-09-20 13:28:09 · 4175 阅读 · 0 评论