xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

資源簡介

用ANN實(shí)現(xiàn)的異或,使用了單隱層的BP算法。

資源截圖

代碼片段和文件信息

#include?
#include?
#include?
#include?
#include?
#define?N_SAMPLES?4
/***************
網(wǎng)絡(luò)如下:?
o-------
0??\????\
???2o----o3
1??/????/
o-------
****************/
float?X[N_SAMPLES][2]?=?{10011100};???????????//每個訓(xùn)練的輸入?
float?d[N_SAMPLES]?=?{1100};?????????????????????????//每個訓(xùn)練的標(biāo)準(zhǔn)輸出?
float?w03w02w13w12w23;
float?theta[4];
float?delta[4];

float?e;
float?E_sum;
float?E_bar;
float?E?=?0.000001;

float?eta?=?0.001;

float?v[4];
float?y[4];
float?abs(float?a)
{
??????if(a>=0)?return?a;
??????if(a<0)?return?(0-a);
}?
float?sigmoid(float?v)?????????????
{
float?f;
f=1/(1+exp(-v));
return?f;
}
float?sigmoid_1(float?v)
{
????return?sigmoid(v)*(1-sigmoid(v));
}
int?init()
{
????srand((unsigned)time(NULL));
????w03?=?rand()/32767.0?-?0.5;
????w02?=?rand()/32767.0?-?0.5;
????w13?=?rand()/32767.0?-?0.5;
????w12?=?rand()/32767.0?-?0.5;
????w23?=?rand()/32767.0?-?0.5;
????theta[0]?=?rand()/32767.0?-?0.5;
????theta[1]?=?rand()/32767.0?-?0.5;
????theta[2]?=?rand()/32767.0?-?0.5;
????theta[3]?=?rand()/32767.0?-?0.5;
}
int?main()
{
????init();
????do
????{
????????E_sum?=?0.0;
????????int?i;
????????for?(i?=?0;

評論

共有 條評論

相關(guān)資源