Learning in neuronal Networks needs seems to get stuck

Hi I’m using the Neuroph library from Java and I’m programming something to detect single numbers. But using even 2 samples the learning-process seems to get stuck here is the link where I got the jars.

http://neuroph.sourceforge.net/download.html
I took the jars put it in a folder with the name network put a folder with the Name library inside and there I put all jars in but called one network. Why doesn’t this work?
Here is my code so far.

import org.neuroph.core.*;
import org.neuroph.core.data.*;
import org.neuroph.core.events.*;
import org.neuroph.core.exceptions.*;
import org.neuroph.core.input.*;
import org.neuroph.core.learning.error.*;
import org.neuroph.core.learning.*;
import org.neuroph.core.learning.stop.*;
import org.neuroph.core.transfer.*;
import org.neuroph.eval.classification.*;
import org.neuroph.eval.*;
import org.neuroph.nnet.*;
import org.neuroph.nnet.comp.*;
import org.neuroph.nnet.comp.layer.*;
import org.neuroph.nnet.comp.neuron.*;
import org.neuroph.nnet.learning.*;
import org.neuroph.nnet.learning.kmeans.*;
import org.neuroph.nnet.learning.knn.*;
import org.neuroph.util.benchmark.*;
import org.neuroph.util.*;
import org.neuroph.util.data.norm.*;
import org.neuroph.util.data.sample.*;
import org.neuroph.util.io.*;
import org.neuroph.util.plugins.*;
import org.neuroph.util.random.*;


DataSet data=new DataSet(400,10);
NeuralNetwork network=new MultiLayerPerceptron(400,400,200,100,50,10);
void setup() {stroke(0);
  strokeWeight(20);
  size(400, 400);
  background(255);
}
void draw() {
}
void keyPressed() {
  for(int i=0;i<10;i++) if(key==(i+"").charAt(0)){background(255);
  double outp[]={0,0,0,0,0,0,0,0,0,0};
  outp[i]=1;
  double getpixel[]=new double[400];
  for(int x=0;x<20;x++) for(int j=0;j<20;j++) getpixel[x+20*j]=blue(get(x*20,j*20))/255; 
  data.add(getpixel,outp);
  
  }
  if(key=='l') network.learn(data);
}
void mouseDragged() {point(mouseX,mouseY);
}
1 Like

possibly it is about
missing
library.properties file


I tried the original jars in Java it doesn’t work too.
Here is the code for Java:

import org.neuroph.core.*;
import org.neuroph.core.data.*;

import org.neuroph.nnet.*;

import processing.core.*;
public class MainClass extends PApplet{
	DataSet data=new DataSet(400,10);
	@SuppressWarnings("rawtypes")
	NeuralNetwork network=new MultiLayerPerceptron(400,400,200,100,50,10);
	public void settings() {
		  size(400, 400);}
	public void setup() {
		stroke(0);
	  strokeWeight(20);
	  background(255);
	}
	public void draw() {
	}
	public void keyPressed() {
	  for(int i=0;i<10;i++) if(key==(i+"").charAt(0)){background(255);
	  double outp[]={0,0,0,0,0,0,0,0,0,0};
	  outp[i]=1;
	  double getpixel[]=new double[400];
	  for(int x=0;x<20;x++) for(int j=0;j<20;j++) getpixel[x+20*j]=blue(get(x*20,j*20))/255; 
	  data.add(getpixel,outp);
	  
	  }
	  if(key=='l') network.learn(data);
	}
	public void mouseDragged() {point(mouseX,mouseY);
	}
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		PApplet.main("MainClass");
	}

}