Softmax 回归的向量化实现

发布于 2024-12-28 23:33:31 字数 551 浏览 4 评论 0原文

我正在 Octave 中实现 softmax 回归。目前我正在使用使用以下成本函数和导数的非矢量化实现。

替代文本

alt text

来源:Softmax 回归

现在我想在 Octave 中实现它的矢量化版本。对我来说,为这些方程编写矢量化版本似乎有点困难。有人可以帮我实现这个吗?

谢谢乌普尔

I’m implementing softmax regression in Octave. Currently I’m using a non-vectorized implementation using following cost function and derivatives.

alt text

alt text

Source: Softmax Regression

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 ?

Thanks

Upul

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

最偏执的依靠 2025-01-04 23:33:31

这与吴恩达深度学习课上的练习非常相似,他们给出了一些提示
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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文