相关代码 |
|
function out=prop1(in,w,b); % % Propagates an input vector % through one layer of a network % % call: % % [out]=prop(in,w); % % w = weight matrix % b = bias weights (column vector. Same size a second layer) % in = input vector % out = propagated signal % % % Determine the size of the two layers % [prsize thsize]=size(w); % % Calculate the input for each neuron % in the second layer % net=[]; for i = 1:thsize net(i)=sig(sum(in.*w(:,i))+b(i)); end out=net;
相关资源 |
|