Deep learning II - I Practical aspects of deep learning - Vanishing/Exploring gradients 梯度消失/爆炸

Vanishing/Exploring gradients 梯度消失/爆炸


这里写图片描述
如图所示,由于深度神经网络深度较大,当每一层的 w w 都小于1或者都大于1时,最终的输出值会成指数级较小或上升,造成梯度消失或者爆炸,从而使得梯度下降变得困难
这里写图片描述
1. 为了不让z太大,当 n n 越大时,w的值应该越小
2. 针对 ReLU R e L U ,初始化 w[l]=np.random.randn(shape)np.sqrt(2n[l1]) w [ l ] = n p . r a n d o m . r a n d n ( s h a p e ) ∗ n p . s q r t ( 2 n [ l − 1 ] )
3. 针对 tanh tanh ,初始化 w[l]=np.random.randn(shape)np.sqrt(1n[l1]) w [ l ] = n p . r a n d o m . r a n d n ( s h a p e ) ∗ n p . s q r t ( 1 n [ l − 1 ] ) ,方法叫做Xavier initialization.
4. 还有些小众一点的,如 w[l]=np.random.randn(shape)np.sqrt(2n[l1]+n[l]) w [ l ] = n p . r a n d o m . r a n d n ( s h a p e ) ∗ n p . s q r t ( 2 n [ l − 1 ] + n [ l ] )

通过以上方法,并不能完全解决梯度消失/爆炸问题,但是可以减缓影像,加速训练

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Exploring an advanced state of the art deep learning models and its applications using Popular python libraries like Keras, Tensorflow, and Pytorch Key Features • A strong foundation on neural networks and deep learning with Python libraries. • Explore advanced deep learning techniques and their applications across computer vision and NLP. • Learn how a computer can navigate in complex environments with reinforcement learning. Book Description With the surge of Artificial Intelligence in each and every application catering to both business and consumer needs, Deep Learning becomes the prime need of today and future market demands. This book explores deep learning and builds a strong deep learning mindset in order to put them into use in their smart artificial intelligence projects. This second edition builds strong grounds of deep learning, deep neural networks and how to train them with high-performance algorithms and popular python frameworks. You will uncover different neural networks architectures like convolutional networks, recurrent networks, long short term memory (LSTM) and solve problems across image recognition, natural language processing, and time-series prediction. You will also explore the newly evolved area of reinforcement learning and it will help you to understand the state-of-the-art algorithms which are the main engines behind popular game Go, Atari, and Dota. By the end of the book, you will be well versed with practical deep learning knowledge and its real-world applications What you will learn • Grasp mathematical theory behind neural networks and deep learning process. • Investigate and resolve computer vision challenges using convolutional networks and capsule networks. • Solve Generative tasks using Variational Autoencoders and Generative Adversarial Nets (GANs). • Explore Reinforcement Learning and understand how agents behave in a complex environment. • Implement complex natural language processing tasks using recurrent networks (LSTM, GRU), and attention models. Who This Book Is For This book is for Data Science practitioners, Machine Learning Engineers and Deep learning aspirants who have a basic foundation of Machine Learning concepts and some programming experience with Python. A mathematical background with a conceptual understanding of calculus and statistics is also desired
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值