2022Cs231n笔记-神经网络和反向传播

本文详细介绍了神经网络的结构和容量设定,重点解析了反向传播的计算思想,包括如何利用计算图和链式法则求解权重梯度。通过PyTorch的autograd机制,解释了如何在实践中实现反向传播,并探讨了向量反向传播中的雅克比矩阵应用。此外,文章还讨论了神经网络正则化对抗过拟合的重要性。
摘要由CSDN通过智能技术生成

一切图片来自官方PPT网站Index of /slides/2022 

代码部分:双层网络(仿射层+ReLu层)_iwill323的博客-CSDN博客

目录

神经网络

神经网络结构​

 关于神经网络capacity的设定

反向传播

计算思想

例子

pytorch中的反向传播

向量的反向传播

引申


神经网络

神经网络结构

神经网络计算层数的时候是不带输入层的

 “3-layer Neural Net”, or “2-hidden-layer Neural Net”

# forward-pass of a 3-layer neural network:
f = lambda x: 1.0/(1.0 + np.exp(-x)) # activation function (use sigmoid)
x = np.random.randn(3, 1) # random input vector of three numbers (3x1)
h1 = f(np.dot(W1, x) + b1) # calculate first hidden layer activations (4x1)
h2 = f(np.dot(W2, h1) + b2) # calculate second hidden layer activations (4x1)
out = np.dot(W3, h2) + b3 # output neuron (1x1)

 关于神经网络capacity的设定

神经网络尺寸越大越容易过拟合

使用正则化可以抑制过拟合

官方笔记的建议:The regularization strength is the preferred way to control the overfitting of a neural network. The takeaway is that you shou

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值