jeffheaton / encog-java-core

http://www.heatonresearch.com/encog
Other
744 stars 268 forks source link

Backpropagation comments #168

Open JohnVorwald opened 10 years ago

JohnVorwald commented 10 years ago

Consider reformulating the formuation, and coding, including threshold functions, using matrix expressions, instead of all the low level loops. Then the output error function can be more general, depending on more than just the single neuron output. Also, the coding is quite a bit simpler.

For example, feed forward is given by for(iLayer:layers) iLayer.linearOutput = iLayer.weights * iLayer.inputs + iLayer.bias; iLayer.squashedOutput = iLayer.threshold(iLayer.linearOutput); end