How do i select the weights of kernals in convolutional neural networks? i am using rand(3,3) for 3X3 kernel filtering. am i in the correct way??!!

2 views (last 30 days)
IM=imresize(IM,[33,33]); %%resizing into 33X33
[row,col,chan]=size(IM);
lower=-1/sqrt(3);
upper=1/sqrt(3);
w=rand(3,3,64); % initializing random weights with 3X3X64 size of interest
conv1=zeros(row,col,64); %% decraling conv1 layer with zeros for ii=1:size(w,3)
conv1(:,:,ii)=imfilter(IM,w(:,:,ii)); %%convolving with kernals
end

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!