Exercise:Softmax Regression 代码示例
来源:互联网 发布:淘宝标题带特价 编辑:程序博客网 时间:2024/05/23 17:19
练习参考Softmax Regression
softmaxCost.m 中加入代码:
M = theta*data;
M = exp(bsxfun(@minus, M, max(M, [], 1)));
P = bsxfun(@rdivide, M, sum(M));
M = log(P);
WD = lambda / 2 * sum(sum(theta.^2));
cost = -sum(sum(groundTruth.*M)) / size(M,2) + WD;
thetagrad = -(groundTruth - P) * data' ./ size(data,2) + lambda.*theta;
softmaxPredict.m中加入代码:
m = theta * data;
[~,pred] = max(m);
softmaxExercise.m中设置DEBUG为false,运行。
0 0
- Exercise:Softmax Regression 代码示例
- UFLDL Exercise:Softmax Regression
- UFLDL Exercise:Softmax Regression
- UFLDL Exercise:Softmax Regression
- UFLDL Exercise: Softmax Regression
- UFLDL教程:Exercise:Softmax Regression
- Ufldl Exercise:Softmax Regression Softmax回归练习
- Stanford UFLDL教程 Exercise:Softmax Regression
- UFLDL教程答案(4):Exercise:Softmax Regression
- UFLDL教程Exercise答案(4):Softmax Regression
- UFLDL——Exercise: Softmax Regression (softmax回归)
- Convolutional neural networks(CNN) (七) Softmax Regression Exercise
- Exercise:Vectorization 代码示例
- SoftMax regression
- Softmax Regression
- softmax regression
- Softmax Regression
- Softmax Regression
- HDU - 2501 - Tiling_easy version (简单递推关系!!)
- UVA - 10392 Factoring Large Numbers 分解因子
- Android系统梳理-AndroidManifest.xml文件说明2
- Linux 开发环境工具 下载网址大全
- (this->*p)();的理解
- Exercise:Softmax Regression 代码示例
- 面向对象的基本框架的总结
- 用Python编写干净 可测试 高质量的代码
- 好像叫quickSort
- 按月、按天计算失效日期的代码实现
- 利用Host主机的 虚拟化技术来运行虚拟机(QEMU)
- GetCurrentProcess() and GetCurrentProcessId()
- GRUB4DOS使用大全
- Python nose test framework 介绍