⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 init_filter_def.m~

📁 Standard model object recognition matlab code
💻 M~
字号:
function [a,b,c,d] = init_filter_def (layer)% FUNCTION [a,b,c,d] = init_filter_def (layer)% % Output:%   a = number of scales%   b = pooling ranges in x and y, and num old/new features%       Note b(4,:) is the number of total features, and hence,%       it is different from the number of afferents.%   c = shift%   d = scale bands%% Some parameters are different for S- and C-layer units.  One% should make sure that the progression of parameters makes sense.% For example, going from C2b to VTU, the number of scales should% go from 8 to 1.  The number of features from S2b to C2b should be% the same, etc., etc.% % Note that some parameter values shown below are "recorded" here% for a reference (ie. the value here does not make any difference% in the program), but by putting down all the parameters in one% place should make debugging easier.  For example, S1 parameters% are defined in filt_get_S1.m.global learn_file;default_num = 1000;switch layer  case 1 % S1    % Defined also in filt_get_S1.m in more detail.    a = 8;    b = [9 9 1 8; 13 13 1 8; 17 17 1 8; 21 21 1 8; ...	  25 25 1 8; 29 29 1 8; 33 33 1 8; 39 39 1 12]';    c = repmat([1], [a 1]);    d = [1 2 3 4 5 6 7 8];    case 2 % C1    a = 8;    b = [8 8 8 4; 10 10 8 4; 12 12 8 4; 14 14 8 4; ...	  16 16 8 4; 18 18 8 4; 20 20 8 4; 22 22 12 4]';    c = [3 4 5 7 8 9 10 12];    d = [1 2 3 4 5 6 7 8];    case 3 % S2b    a = 8;    b = repmat([9 9 4 default_num], [a 1])';    %b = repmat([3 3 4 default_num], [a 1])';    c = repmat([3], [a 1]);    c = repmat([1], [a 1]);    d = [1 2 3 4 5 6 7 8];    case 4 % C2b    a = 8;    b = repmat([40 40 default_num default_num], [a 1])';    c = repmat([1], [a 1]); % Does not matter for C2b    d = [1 1 1 1 1 1 1 1];    case 5 % S2    a = 8;    b = repmat([3 3 4 default_num], [a 1])';    c = repmat([2], [a 1]);    d = [1:1:8];    case 6 % C2    a = 8;    b = repmat([3 3 default_num default_num], [a 1])';    c = repmat([2], [a 1]);    d = [1 1 2 2 3 3 4 4];  case 7 % S3    % Especially for S3, it is important that the number of    % features in b(3,:) matches that in S2, because the index i3    % depends on the number of features from the previous layer.    a = 4;    b = repmat([3 3 default_num default_num], [a 1])';    c = repmat([1], [a 1]);    d = [1 2 3 4];    case 8 % C3    a = 4;    b = repmat([40 40 default_num default_num], [a 1])';    c = repmat([1], [a 1]);    d = [1 1 1 1];    case 9 % S4    a = 1;    b = repmat([1 1 default_num 100], [a 1]');    c = repmat([1], [a 1]);    d = [1];        otherwise    error('Layer not defined.');end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -