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

📄 stdnet.h

📁 GENETIC ALGORITHM FOR NEURAL NETWORKS ON TRANSPUTERS (Source code and Reference)
💻 H
字号:
/* Declarations for standard 2 layer networks */#ifndef STDNET_H#define STDNET_H#include "defs.h"char *StdOptStr();char *StdUsage();char StdName[80];/* These and Nin,Nhid,Nout,Ntrain are to be defined *//* in initStd() */int Nbits;	/* bits for bias and weights (gen.alg.) */float Width;	/* weights in [-Width,Width] */int handleStdOpt(char opt,char* arg);int initStd();void initTrain();/* Standard Decoding */int OffW1,OffW2,IncW1,IncW2,OffLR,OffIM;float FGmult,FGadd;int FGmax;float *grey2float;float *grey2lrate;float *grey2imp;word *int2grey;int initDecoding();#define Nlrate	8#define Nimp	8#define Llrate	0.02#define Hlrate	20.0#define Limp	0.0#define Himp	0.95#define decode(x,i,n) grey2float[getbits(x,i,n)]#define weight1(x,i,h) decode(x,IncW1*h+Nbits*i,Nbits)#define weight2(x,h,o) decode(x,OffW2+IncW2*o+Nbits*h,Nbits)#define bias1(x,h) weight1(x,Nin,h)#define bias2(x,o) weight2(x,Nhid,o)#define lrate(x) grey2lrate[getbits(x,OffLR,Nlrate)]#define imp(x) grey2imp[getbits(x,OffIM,Nimp)]#define float2int(x) ((int)(x*FGmult+FGadd))#define sigma(y)	1/(1+exp(-(y)))#endif

⌨️ 快捷键说明

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