Softmax回归的矢量化实现 [英] Vectorized Implementation of Softmax Regression
问题描述
我正在Octave中实现softmax回归.目前,我正在使用非矢量化的实现,并使用以下成本函数和导数.
I’m implementing softmax regression in Octave. Currently I’m using a non-vectorized implementation using following cost function and derivatives.
来源: Softmax回归
现在,我想在Octave中实现它的矢量化版本.我为这些方程式编写向量化版本似乎有点困难.有人可以帮我实现吗?
Now I want to implement vectorized version of it in Octave. It seems like bit hard for me to write vectorized versions for these equations. Can somebody help me to implement this ?
谢谢
Upul
推荐答案
这与Andrew Ng的深度学习课程中的练习非常相似,它们给出了一些提示 http://ufldl.stanford.edu/wiki/index.php/Exercise:Vectorization
This is very similar to an exercise in Andrew Ng's deep learning class, they give some hints http://ufldl.stanford.edu/wiki/index.php/Exercise:Vectorization
这篇关于Softmax回归的矢量化实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!