i have a cell array with elements 22*22,18*18*6,14*14*6,10*10*6,6*6*6.can u please help me to initialize it
Update:
s{l(:,:,feature_map)=zeros(22,22),zeros(18,18,6),zeros(14,14,6),zeros(10,10,6),zeros(6*6*6)
By using the above command first element of cell array is empty.all other elements have 22*22*6 elements.it’l create problems in convolution
code is:
num_of_maps_in_layer{1}=1;
for i=1:3
num_of_maps_in_layer{i+1}=6;
end
num_of_maps_in_layer{5}=6;
for l=2:5
for feature_map=1:num_of_maps_in_layer{l}
sensitivity{l}(:,:,feature_map)=zeros(22,22),zeros(18,18,6),zeros(14,14,6),zeros(10,10,6),zeros(6*6*6)
end
end
I think this is what you want to do:
This creates a 5-element cell array
sensitivity. The first cell contains a 22-by-22 numeric array of zeroes, the second cell contains an 18-by-18-by-6 numeric array of zeroes, etc.