With neural networks, we are working with sets of matrices:
![](https://img.haomeiwen.com/i14494447/ccd76d9ae3569f89.png)
In order to use optimizing functions such as "fminunc()", we will want to "unroll" all the elements and put them into one long vector:
![](https://img.haomeiwen.com/i14494447/197d1565d1d7998a.png)
If the dimensions of Theta1 is 10x11, Theta2 is 10x11 and Theta3 is 1x11, then we can get back our original matrices from the "unrolled" versions as follows:
![](https://img.haomeiwen.com/i14494447/2ad6d164b9830e77.png)
To summarize:
![](https://img.haomeiwen.com/i14494447/499c0b8a159b432f.png)
来源:coursera 斯坦福 吴恩达 机器学习
网友评论