Exercise:Self-Taught Learning 代码示例
来源:互联网 发布:php把字符串变成数组 编辑:程序博客网 时间:2024/06/07 21:58
练习参考Self-Taught Learning
结合使用稀疏自编码器和Softmax分类器对0到4的手写数字进行分类。首先利用稀疏自编码器无监督学习手写数字5到9的特征。利用学到的权重和偏置计算手写数字0到4的激活值,并将激活值作为Softmax分类器的输入进行分类(有监督学习)。
Train the sparse autoencoder
opttheta = theta;addpath minFunc/options.Method = 'lbfgs'; options.maxIter = maxIter;options.display = 'on';[opttheta, cost] = minFunc( @(p) sparseAutoencoderCost(p, ... inputSize, hiddenSize, ... lambda, sparsityParam, ... beta, unlabeledData), ... theta, options);
Extracting features
feedForwardAutoencoder.m
activation = sigmoid(W1*data+repmat(b1,1,size(data,2)));
Train the softmax classifier
lambda = 1e-4;options.maxIter = 100;softmaxModel = softmaxTrain(hiddenSize, numLabels, lambda, ... trainFeatures, trainLabels, options);
Testing
[pred] = softmaxPredict(softmaxModel, testFeatures);
0 0
- Exercise:Self-Taught Learning 代码示例
- UFLFL Exercise:Self-Taught Learning
- UFLDL Exercise:Self-Taught Learning
- UFLDL Exercise:Self-Taught Learning
- UFLDL Exercise: Self-Taught Learning
- Ufldl Exercise:Self-Taught Learning
- Stanford UFLDL教程 Exercise:Self-Taught Learning
- UFLDL教程: Exercise:Self-Taught Learning
- UFLDL——Exercise:Self-Taught Learning 自我学习
- UFLDL教程答案(5):Exercise:Self-Taught Learning
- Convolutional neural networks(CNN) (八) Self-Taught Learning Exercise
- Self-Taught Learning
- Deep learning----------Self-taught learning
- 【self-taught learning】学习论文以及代用代码
- 【UFLDL-exercise6- Self-Taught Learning】
- 【Deep Learning】4、Self-Taught Learning
- Deep learning:十五(Self-Taught Learning练习)
- Deep learning:十五(Self-Taught Learning练习)
- 密码生成器
- 第17周项目6-学生成绩统计(从文件中读入)
- 获取Spring ApplicationContext 几种方法
- View中的draw和onDraw的区别
- ERLANG 语法基础
- Exercise:Self-Taught Learning 代码示例
- Android 修改出厂默认日期和默认时区的方法
- STM的调试问题集锦(更新中)
- 视锥裁剪
- ios 中内容label高度自适应
- Linux下Redis启动/关闭/重启服务脚本
- Fleury (弗罗莱) 算法通俗解释
- 2014.12.23
- 【objectivet-c】语法(四)初始化