遗传算法的源代码下载,遗传算法的源代码下载

源代码在线查看: prop.m

软件大小: 3748 K
上传用户: dounob
关键词: 算法 源代码
下载地址: 免注册下载 普通下载 VIP

相关代码

				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;
							

相关资源