📄 sample_script_one.m
字号:
% sample_script_one%% This is an example of how to run the model on one image. This is% rather slow (and not efficient when just running one image),% because we need to create the default filter for a given image% size. However, you may save the filter, so that you can use with% other images with the same size.%% See other sample files for the case when there are multiple images.% Suppose this is your stimulus.stim = rand(128,128); load ./Images/r_i001.mat;stim = r;% Define intermediate, learned features.global learn_file;learn_file{3} = './Data/f_S2b_natural_img';learn_file{5} = './Data/f_S2_natural_img';learn_file{7} = './Data/f_S3_natural_img';learn_file{9} = './Data/f_VTU_natural_img';% level: define which layers to compute.level = [1 1 1 1 1 1 1 1];stim_size = size(stim);[f,s,o] = init_filt_oper(level);% Now run the model on stimulus.disp(['Running on the model on one image.']);tic;r = main_model(stim,f,s,o);elap_time = toc;disp(['It took ' num2str(elap_time/60) ' mins.']);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -