-
Notifications
You must be signed in to change notification settings - Fork 0
Symulation
The class representation of network is Network:).
First you should read from disk previusly maked network. Use FileS.readNetwork(String fileName) ,or create weights data manualy in code(just float[layers][neurons][connections] array), choose what output function it should use(choose one from functions source package). to second option you have this constructors: -public Network(int inputNumber, float[][][] weights, Function function) -public Network(int inputNumber, float[][][] weights, Function function, boolean initializeOpenCL)
about initializeOpenCL bool search info there(I must add link).
when you have your network use simulate(float[] inputData) to simulate network.
I skiped class and method declaration lines
String fileName="yourNetwork";
Network network=FileS.readNetwork(fileName); //Load your network from disc
float[] inputData=new float[]{1,1}; System.out.println(input data);
int inputNumber=2;
float[][][] weights=new float[1][2][2] float[0][0][0]=1; float[0][0][1]=2; float[0][1][0]=3; float[0][1][1]=4;
Function fuction=new Linear();
Network network=new Network(inputNumber,weights,function);
float[] inputData=new float[]{1,1}; System.out.println(network.simulate(inputData);