📄 natdata.m
字号:
function V = natdata% natdata - read natural image data preprocessed into ON/OFF channels%% Data parameterswsize = 12;samples = 10000; % Sample image patches from pre-whitened Olshausen's imagesZ = sampleimages( wsize, samples ); % Separate into ON and OFF channels.Y = Z; Y(Y<0)=0; Z(Z>0)=0; Z=-Z;V = [Y; Z];% Additionally, this is required to avoid having any exact zeros:% (divergence objective cannot handle them!)V = max(V,1e-4);% Normalize each channel to unit mean squared activationV = V./(sqrt(mean(V.^2,2))*ones(1,size(V,2)));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -