utilities(matlab)—— normalize
2016-05-07 18:13
351 查看
%% --------------------------------------------------------------- function patches = normalizeData(patches) % Squash data to [0.1, 0.9] since we use sigmoid as the activation % function in the output layer % Remove DC (mean of images). patches = bsxfun(@minus, patches, mean(patches)); % Truncate to +/-3 standard deviations and scale to -1 to 1 pstd = 3 * std(patches(:)); patches = max(min(patches, pstd), -pstd) / pstd; % Rescale from [-1,1] to [0.1,0.9] patches = (patches + 1) * 0.4 + 0.1; end
相关文章推荐
- matlab处理lvm格式文本
- MATLAB GPU编程基础
- MATLAB2014a中help与参考页中文翻译(用于学习) cat
- win10系统中ASP.NET(VS2013)和MATLAB混编,调用MATLAB生成的.dll文件
- matlab 中的内联函数、匿名函数和函数函数
- 用Matlab的FDAtool生成IIR滤波器参数
- matlab debug
- matlab GUI入门实现字符串传递的功能
- MATLAB的符号运算基础
- SAR成像学习(五)方位向成像及matlab代码解析
- fprintf 输出矩阵到txt的方法
- matlab 字符串处理(单引号、拼接、char)
- matlab struct 结构体
- MATLAB的size()函数的返回值是一个1*2的向量哦,即使参数是向量也是1*2的向量哦!
- 要看懂MATLAB的Help需要积累的英文词汇!
- 深度学习入门级框架MatConvNet环境配置(Ubuntu14.04+Cuda7.5+Cudnn5+Matlab2014a)
- 构建复杂的应用程序(一)—— matlab
- matlab libsvm支持向量机工具箱安装与使用
- 区域生长算法(附MATLAB代码实现)
- matlab eps