美文网首页
【机器学习】-Week5.5 Random Initializa

【机器学习】-Week5.5 Random Initializa

作者: Kitty_风花 | 来源:发表于2019-12-29 09:58 被阅读0次

Initializing all theta weights to zero does not work with neural networks. When we backpropagate, all nodes will update to the same value repeatedly. Instead we can randomly initialize our weights for our Θ matrices using the following method:

Hence, we initialize each Θ(l)ij to a random value between[−ϵ,ϵ]. Using the above formula guarantees that we get the desired bound. The same procedure applies to all the Θ's. Below is some working code you could use to experiment.

rand(x,y) is just a function in octave that will initialize a matrix of random real numbers between 0 and 1.

(Note: the epsilon used above is unrelated to the epsilon from Gradient Checking)

来源:coursera 斯坦福 吴恩达 机器学习

相关文章

网友评论

      本文标题:【机器学习】-Week5.5 Random Initializa

      本文链接:https://www.haomeiwen.com/subject/hruiyctx.html