美文网首页
2018-12-20神经网络参数展开

2018-12-20神经网络参数展开

作者: 奈何qiao | 来源:发表于2018-12-20 14:59 被阅读0次

    为了使用诸如“fminunc()”之类的优化函数,我们将要“展开”所有元素并将它们放入一个长向量中:

    thetaVector = [ Theta1(:); Theta2(:); Theta3(:); ]

    deltaVector = [ D1(:); D2(:); D3(:) ]

    如果Theta1的尺寸是10x11,Theta2是10x11而Theta3是1x11,那么我们可以从“展开”版本中取回原始矩阵,如下所示:

    Theta1 = reshape(thetaVector(1:110),10,11)

    Theta2 = reshape(thetaVector(111:220),10,11)

    Theta3 = reshape(thetaVector(221:231),1,11)

    参数展开 学习算法

    相关文章

      网友评论

          本文标题:2018-12-20神经网络参数展开

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