ammarblue / encog-java

Automatically exported from code.google.com/p/encog-java
0 stars 0 forks source link

Trying to assign invalud number to matrix: NaN #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I often got this stacktrace when training a network:

Exception in thread "main" org.encog.matrix.MatrixError: Trying to assign
invalud number to matrix: NaN
    at org.encog.matrix.Matrix.set(Matrix.java:415)
    at
org.encog.neural.networks.layers.FeedforwardLayer.createInputMatrix(FeedforwardL
ayer.java:135)
    at
org.encog.neural.networks.layers.FeedforwardLayer.compute(FeedforwardLayer.java:
110)
    at org.encog.neural.networks.BasicNetwork.compute(BasicNetwork.java:227)
    at
org.encog.neural.networks.BasicNetwork.calculateError(BasicNetwork.java:155)
    at
org.encog.neural.networks.training.backpropagation.Backpropagation.iteration(Bac
kpropagation.java:204)

Original issue reported on code.google.com by astropho...@gmail.com on 5 Mar 2009 at 1:22

GoogleCodeExporter commented 9 years ago
I am also getting this error even though I check my input array and find all 
valid
doubles

Original comment by kylepol...@gmail.com on 3 Apr 2009 at 3:09

GoogleCodeExporter commented 9 years ago
I've also been pursuing this on the forums over at
http://www.heatonresearch.com/node/96 and they suggest my learning rate was too 
low.
 I tried that but it did not fix my particular problem.  I found that for me, the
input domain was [-127, 128] and if I normalized this to [-1, 1], then the 
error went
away.  Naturally, I can "un-normalize" the output prediction as needed.

Original comment by kylepol...@gmail.com on 4 Apr 2009 at 9:58

GoogleCodeExporter commented 9 years ago
This was fixed as a part of 2.0.

Original comment by JeffHeat...@gmail.com on 8 Jul 2009 at 1:19