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

📄 xor.bp

📁 #ifdef INTEGER #include "ibp.h" #else #include "rbp.h" #endif /* built-in C functions */
💻 BP
字号:
* This is the classic xor problem z = xor(x,y).  X and y are input and
* z needs to be computed or maybe its more accurate to say the network
* needs to memorize the output z for each x and y.
*
* The learning times vary depending on the initial random weights, the
* algorithm chosen and all the parameter settings.  The results can also
* depend ever so slightly on the floating point hardware being used and
* whether or not the compiler is optimizing.  The file xor.ini contains
* one set of random weights and the file xorrbp.cpy shows the results
* for these weights using the rbp program with the standard smooth
* sigmoid.  The file xorbp.cpy shows the results for these weights using
* the bp program and the standard smooth sigmoid.
*
* The parameter and algorithm settings here are not particularly good so
* you may want to play around to try and find the best, which as far as
* I can tell will be around 20 iterations with a failure rate of around
* 10%.

m 2 1 1 x   * make a 2-1-1 network
s7          * seed the random number generator
ci 1        * giving the network a "kick" sets new random weights
a as        * standard smooth sigmoid

rt {        * there are four patterns following
1 0 1
0 0 0
0 1 1
1 1 0 }

e 0.5       * set the learning rate, eta to 0.5
a 0.9       * set the momentum, alpha to 0.9

⌨️ 快捷键说明

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